@vue-jsx-vapor/babel
Version:
Vue JSX Vapor Babel Plugin
10 lines (9 loc) • 482 B
JavaScript
//#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 };