UNPKG

@vue-jsx-vapor/babel

Version:
10 lines (9 loc) 482 B
//#region src/utils.ts function isConditionalExpression(path) { return !!(path && (path?.type === "LogicalExpression" || path.type === "ConditionalExpression") && (path.parent.type === "JSXExpressionContainer" || path.parent.type === "ConditionalExpression" && isConditionalExpression(path.parentPath))); } function isJSXElement(node) { return !!node && (node.type === "JSXElement" || node.type === "JSXFragment"); } //#endregion export { isConditionalExpression, isJSXElement };