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

Method implicitLoop

www/js/_hyperscript.js:2573–2579  ·  view source on GitHub ↗
(value, func)

Source from the content-addressed store, hash-verified

2571 }
2572 }
2573 implicitLoop(value, func) {
2574 if (this.shouldAutoIterate(value)) {
2575 for (const x of value) func(x);
2576 } else {
2577 func(value);
2578 }
2579 }
2580 /**
2581 * Iterate over targets with a when condition, applying forward or reverse per element.
2582 * Supports async conditions transparently -- returns a Promise if any condition is async.

Callers 15

replaceInDomMethod · 0.95
implicitLoopWhenMethod · 0.95
_hyperscript.jsFile · 0.45
setMethod · 0.45
deleteMethod · 0.45
setMethod · 0.45
deleteMethod · 0.45
setMethod · 0.45
resolveMethod · 0.45
setMethod · 0.45
resolveMethod · 0.45
_resolveScrollFunction · 0.45

Calls 1

shouldAutoIterateMethod · 0.95

Tested by

no test coverage detected