MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / #flatGet

Method #flatGet

src/core/runtime/runtime.js:416–431  ·  view source on GitHub ↗
(root, property, getter)

Source from the content-addressed store, hash-verified

414 }
415
416 #flatGet(root, property, getter) {
417 if (root != null) {
418 var val = getter(root, property);
419 if (typeof val !== "undefined") {
420 return val;
421 }
422 if (this.shouldAutoIterate(root)) {
423 var result = [];
424 for (var component of root) {
425 var componentValue = getter(component, property);
426 result.push(componentValue);
427 }
428 return result;
429 }
430 }
431 }
432
433 resolveProperty(root, property) {
434 if (this.reactivity.isTracking) this.reactivity.trackProperty(root, property);

Callers 4

resolvePropertyMethod · 0.95
resolveAttributeMethod · 0.95
resolveStyleMethod · 0.95
resolveComputedStyleMethod · 0.95

Calls 1

shouldAutoIterateMethod · 0.95

Tested by

no test coverage detected