MCPcopy Create free account
hub / github.com/bugy/script-server / getNodeText

Function getNodeText

web-src/tests/unit/test_utils.js:178–183  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

176}
177
178export function getNodeText(element) {
179 return Array.from(element.childNodes)
180 .filter(child => child.nodeType === 3)
181 .map(child => child.nodeValue.trim())
182 .reduce((left, right) => left + right);
183}

Callers 1

verifyChipsFunction · 0.90

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected