decord/source/design/utils/shared/getNodeText.tsx

29 lines
719 B
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 3838
2026-07-27 11:26:19 +00:00
// Function ID: 32014
2026-07-20 16:05:17 +00:00
// Name: getNodeText
2026-07-23 10:11:24 +00:00
// Dependencies: [31, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 3838 (getNodeText)
2026-07-23 10:11:24 +00:00
import result from "result";
const result = require("set").fileFinishedImporting("design/utils/shared/getNodeText.tsx");
2026-07-20 16:05:17 +00:00
function getNodeText(children) {
let mapped = children;
let tmp2 = children;
if ("string" !== typeof children) {
tmp2 = mapped;
if ("number" !== tmp) {
const _Array = Array;
if (mapped instanceof Array) {
mapped = mapped.map(getNodeText);
let joined = mapped.join("");
} else if (validElement.isValidElement(mapped)) {
joined = getNodeText(mapped.props.children);
}
}
}
return tmp2;
}
export { getNodeText };