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

Method forEach

src/core/runtime/runtime.js:560–574  ·  view source on GitHub ↗
(value, func)

Source from the content-addressed store, hash-verified

558 }
559
560 forEach(value, func) {
561 if (value == null) {
562 // do nothing
563 } else if (this.#isIterable(value)) {
564 for (const nth of value) {
565 func(nth);
566 }
567 } else if (this.#isArrayLike(value)) {
568 for (var i = 0; i < value.length; i++) {
569 func(value[i]);
570 }
571 } else {
572 func(value);
573 }
574 }
575
576 implicitLoop(value, func) {
577 if (this.shouldAutoIterate(value)) {

Callers 15

processNodeMethod · 0.95
_hyperscript.jsFile · 0.45
#resolveSpecifiersMethod · 0.45
addContainerMethod · 0.45
[Symbol.iterator]Method · 0.45
unifiedEvalMethod · 0.45
componentPluginFunction · 0.45
parseMethod · 0.45
resolveMethod · 0.45
resolveMethod · 0.45
toggleMethod · 0.45
resolveMethod · 0.45

Calls 2

#isIterableMethod · 0.95
#isArrayLikeMethod · 0.95

Tested by

no test coverage detected