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

Method #flatGet

www/js/_hyperscript.js:2435–2450  ·  view source on GitHub ↗
(root, property, getter)

Source from the content-addressed store, hash-verified

2433 }
2434 }
2435 #flatGet(root, property, getter) {
2436 if (root != null) {
2437 var val = getter(root, property);
2438 if (typeof val !== "undefined") {
2439 return val;
2440 }
2441 if (this.shouldAutoIterate(root)) {
2442 var result = [];
2443 for (var component of root) {
2444 var componentValue = getter(component, property);
2445 result.push(componentValue);
2446 }
2447 return result;
2448 }
2449 }
2450 }
2451 resolveProperty(root, property) {
2452 if (this.reactivity.isTracking) this.reactivity.trackProperty(root, property);
2453 return this.#flatGet(root, property, (root2, property2) => root2[property2]);

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