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

Function unrollValues

cjs/index.js:104–119  ·  view source on GitHub ↗
(info, values, length)

Source from the content-addressed store, hash-verified

102};
103
104const unrollValues = (info, values, length) => {
105 const {stack} = info;
106 for (let i = 0; i < length; i++) {
107 const hook = values[i];
108 if (hook instanceof Hook)
109 values[i] = unroll(stack[i] || (stack[i] = createCache(info)), hook);
110 else if (hook instanceof Hole)
111 unrollHole(stack[i] || (stack[i] = createCache(info)), hook);
112 else if (isArray(hook))
113 unrollValues(stack[i] || (stack[i] = createCache(info)), hook, hook.length);
114 else
115 stack[i] = null;
116 }
117 if (length < stack.length)
118 stack.splice(length);
119};
120
121const view = (entry, {type, template, values}) =>
122 (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