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

Function unroll

cjs/index.js:91–98  ·  view source on GitHub ↗
(info, {fn, template, values})

Source from the content-addressed store, hash-verified

89const createCache = p => ({p, stack: [], entry: null});
90
91const unroll = (info, {fn, template, values}) => {
92 let {entry} = info;
93 if (!entry || entry.fn !== fn) {
94 info.entry = (entry = {fn, hook: null});
95 entry.hook = createHook(createCache(info), entry);
96 }
97 return entry.hook(template, ...values);
98};
99
100const unrollHole = (info, {values}) => {
101 unrollValues(info, values, values.length);

Callers 2

renderFunction · 0.70
unrollValuesFunction · 0.70

Calls 2

createHookFunction · 0.70
createCacheFunction · 0.70

Tested by

no test coverage detected