@khatastroffik/react-text-renderer-components
Version:
a zero-dependencies component library providing (pure) text rendering for common and custom data/field types.
20 lines (17 loc) • 825 B
JavaScript
/* 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 $e916fd7cd7eb5385$var$factory(ctor, ...args) {
// console.log("FACTORY ARGS: ", ...args);
return new ctor(...args);
}
const $e916fd7cd7eb5385$export$2c00c4d94d5391c0 = (cache, ctor, ...ctorParams)=>{
return cache[Symbol.for(JSON.stringify(ctorParams))] ??= $e916fd7cd7eb5385$var$factory(ctor, ...ctorParams);
};
export {$e916fd7cd7eb5385$export$2c00c4d94d5391c0 as getFromCache};
//# sourceMappingURL=CacheManager.00afa454.js.map