Files
med-notes/.pnpm-store/v10/files/06/9938d2d116c32311a394093aa1174698fab7b5b8e62e55ed85a55c97bece07623ec7d4372535b38cf2559c78c883bbabb359306d6cb12658e6ac43099aa0dc
2025-05-09 05:30:08 +02:00

25 lines
769 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = buildChildren;
var _index = require("../../validators/generated/index.js");
var _cleanJSXElementLiteralChild = require("../../utils/react/cleanJSXElementLiteralChild.js");
function buildChildren(node) {
const elements = [];
for (let i = 0; i < node.children.length; i++) {
let child = node.children[i];
if ((0, _index.isJSXText)(child)) {
(0, _cleanJSXElementLiteralChild.default)(child, elements);
continue;
}
if ((0, _index.isJSXExpressionContainer)(child)) child = child.expression;
if ((0, _index.isJSXEmptyExpression)(child)) continue;
elements.push(child);
}
return elements;
}
//# sourceMappingURL=buildChildren.js.map