@yoot/yoot
Version:
The core library for yoot, providing a CDN-agnostic, chainable API for image URL transformations and adapter integration.
28 lines (27 loc) • 520 B
JavaScript
const s = Symbol("@yoot/yoot"), t = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), n = {
register(...e) {
e.forEach(t.add.bind(t));
},
get(e) {
let o = a.get(e.hostname);
if (!o) {
for (const r of t)
if (r.supports(e)) {
o = r, a.set(e.hostname, o);
break;
}
}
return o;
},
size() {
return t.size;
},
reset() {
t.clear(), a.clear();
}
};
export {
s as YOOT_BRAND,
n as adapterStore
};
//# sourceMappingURL=store.js.map