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

Method #flatGet

tools/common/_hyperscript.iife.js:2426–2441  ·  view source on GitHub ↗
(root, property, getter)

Source from the content-addressed store, hash-verified

2424 }
2425 }
2426 #flatGet(root, property, getter) {
2427 if (root != null) {
2428 var val = getter(root, property);
2429 if (typeof val !== "undefined") {
2430 return val;
2431 }
2432 if (this.shouldAutoIterate(root)) {
2433 var result = [];
2434 for (var component of root) {
2435 var componentValue = getter(component, property);
2436 result.push(componentValue);
2437 }
2438 return result;
2439 }
2440 }
2441 }
2442 resolveProperty(root, property) {
2443 if (this.reactivity.isTracking) this.reactivity.trackProperty(root, property);
2444 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