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

Method implicitLoop

www/js/_hyperscript.esm.js:2571–2577  ·  view source on GitHub ↗
(value, func)

Source from the content-addressed store, hash-verified

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

Callers 15

replaceInDomMethod · 0.95
implicitLoopWhenMethod · 0.95
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