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

Function unroll

esm/index.js:85–92  ·  view source on GitHub ↗
(info, {fn, template, values})

Source from the content-addressed store, hash-verified

83const createCache = p => ({p, stack: [], entry: null});
84
85const unroll = (info, {fn, template, values}) => {
86 let {entry} = info;
87 if (!entry || entry.fn !== fn) {
88 info.entry = (entry = {fn, hook: null});
89 entry.hook = createHook(createCache(info), entry);
90 }
91 return entry.hook(template, ...values);
92};
93
94const unrollHole = (info, {values}) => {
95 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