Urara-Blog/node_modules/.pnpm-store/v3/files/c8/0d8032c11f6208c4a5d4860150ea0f9c3f666b7c1562586bb74eed2ed9ed558e6eabb745110e8ae4c8f60cb2c3581edce43e2fb14753402ec2041ebdf92107
2022-08-14 01:14:53 +08:00

29 lines
No EOL
736 B
Text

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