Initial curated chimera source from a8ae5b1db07fb49926c94585e2718e5130330974

This commit is contained in:
Public Source Publisher committed 2026-10-01 01:38:08 +02:00
commit c737a37f71
531 files changed
+119270

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
'use strict';
(function exposeLibraryModel(root, factory) {
const api = factory();
if (typeof module === 'object' && module.exports) module.exports = api;
else root.chimeraLibraryModel = api;
})(typeof globalThis !== 'undefined' ? globalThis : window, function createLibraryModel() {
function items(response) {
if (Array.isArray(response)) return response;
return Array.isArray(response?.items) ? response.items : [];
}
function isInstalled(title) { return Number(title?.availability?.confirmedInstallCount || 0) > 0; }
function hasLocalCopy(title) { return Number(title?.protection?.localCopyCount || title?.availability?.localCopyCount || 0) > 0; }
function needsProtection(title) { return isInstalled(title) && !hasLocalCopy(title); }
return Object.freeze({ items, isInstalled, hasLocalCopy, needsProtection });
});