MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / implicitLoop

Method implicitLoop

tools/common/_hyperscript.iife.js:2560–2566  ·  view source on GitHub ↗
(value, func)

Source from the content-addressed store, hash-verified

2558 }
2559 }
2560 implicitLoop(value, func) {
2561 if (this.shouldAutoIterate(value)) {
2562 for (const x of value) func(x);
2563 } else {
2564 func(value);
2565 }
2566 }
2567 /**
2568 * Iterate over targets with a when condition, applying forward or reverse per element.
2569 * Supports async conditions transparently -- returns a Promise if any condition is async.

Callers 15

replaceInDomMethod · 0.95
implicitLoopWhenMethod · 0.95
setMethod · 0.45
setMethod · 0.45
setMethod · 0.45
resolveMethod · 0.45
setMethod · 0.45
resolveMethod · 0.45
_resolveScrollFunction · 0.45
resolveMethod · 0.45
resolveMethod · 0.45

Calls 1

shouldAutoIterateMethod · 0.95

Tested by

no test coverage detected