MCPcopy Create free account
hub / github.com/WebReflection/neverland / createFor

Function createFor

cjs/index.js:131–145  ·  view source on GitHub ↗
(lighter)

Source from the content-addressed store, hash-verified

129}
130
131function createFor(lighter) {
132 const cache = umap(new WeakMap);
133 return (
134 (entry, id) => {
135 const store = cache.get(entry) || cache.set(entry, create(null));
136 const info = store[id] || (store[id] = createCache(null));
137 return (
138 (template, ...values) => {
139 unrollValues(info, values);
140 return lighter.for(entry, id)(template, ...values);
141 }
142 );
143 }
144 );
145}
146
147function tta() {
148 let out = [], i = 0, {length} = arguments;

Callers 1

index.jsFile · 0.70

Calls 3

createCacheFunction · 0.70
unrollValuesFunction · 0.70
createFunction · 0.50

Tested by

no test coverage detected