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

Method #flatGet

www/js/_hyperscript-max.js:2434–2449  ·  view source on GitHub ↗
(root, property, getter)

Source from the content-addressed store, hash-verified

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