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

29 lines
735 B
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4103
// Function ID: 4104
2026-07-20 16:05:17 +00:00
// Name: getNodeText
2026-07-29 08:29:29 +00:00
// Dependencies: [19, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 4103 (getNodeText)
import closure_0 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("design/utils/shared/getNodeText.tsx");
2026-07-20 16:05:17 +00:00
function getNodeText(children) {
let mapped = children;
2026-07-29 08:29:29 +00:00
let tmp = children;
2026-08-04 21:03:28 +00:00
if (typeof children !== "string") {
2026-07-29 08:29:29 +00:00
tmp = mapped;
2026-08-04 21:03:28 +00:00
if (typeof mapped !== "number") {
2026-07-20 16:05:17 +00:00
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);
}
}
}
2026-07-29 08:29:29 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
}
export { getNodeText };