@khatastroffik/react-text-renderer-components
Version:
a zero-dependencies component library providing (pure) text rendering for common and custom data/field types.
25 lines (20 loc) • 983 B
JavaScript
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "getFromCache", () => $b8f6b02ccb3471cd$export$2c00c4d94d5391c0);
/* eslint-disable @typescript-eslint/no-explicit-any */ /**
* Type alias for constructor functions
*/ /**
* A factory function to create object instances of any kind, using the object constructor.
*
* @param ctor Type of the object to be constructed
* @param args Arguments to be passed to the constructor of the object
* @returns A new instance of the object
*/ function $b8f6b02ccb3471cd$var$factory(ctor, ...args) {
// console.log("FACTORY ARGS: ", ...args);
return new ctor(...args);
}
const $b8f6b02ccb3471cd$export$2c00c4d94d5391c0 = (cache, ctor, ...ctorParams)=>{
return cache[Symbol.for(JSON.stringify(ctorParams))] ??= $b8f6b02ccb3471cd$var$factory(ctor, ...ctorParams);
};
//# sourceMappingURL=CacheManager.5cf53329.js.map