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

Function unrollValues

esm/index.js:98–113  ·  view source on GitHub ↗
(info, values, length)

Source from the content-addressed store, hash-verified

96};
97
98const unrollValues = (info, values, length) => {
99 const {stack} = info;
100 for (let i = 0; i < length; i++) {
101 const hook = values[i];
102 if (hook instanceof Hook)
103 values[i] = unroll(stack[i] || (stack[i] = createCache(info)), hook);
104 else if (hook instanceof Hole)
105 unrollHole(stack[i] || (stack[i] = createCache(info)), hook);
106 else if (isArray(hook))
107 unrollValues(stack[i] || (stack[i] = createCache(info)), hook, hook.length);
108 else
109 stack[i] = null;
110 }
111 if (length < stack.length)
112 stack.splice(length);
113};
114
115const view = (entry, {type, template, values}) =>
116 (type === 'svg' ? $svg : $html)

Callers 2

unrollHoleFunction · 0.70
createForFunction · 0.70

Calls 3

unrollFunction · 0.70
createCacheFunction · 0.70
unrollHoleFunction · 0.70

Tested by

no test coverage detected