How to use the @babel/helper-skip-transparent-expression-wrappers.skipTransparentExprWrappers function in @babel/helper-skip-transparent-expression-wrappers

To help you get started, we’ve selected a few @babel/helper-skip-transparent-expression-wrappers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alan-ai / alan-sdk-reactnative / testtools / node_modules / @babel / plugin-proposal-optional-chaining / lib / index.js View on Github external
function isSimpleMemberExpression(expression) {
    expression = (0, _helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(expression);
    return _core.types.isIdentifier(expression) || _core.types.isSuper(expression) || _core.types.isMemberExpression(expression) && !expression.computed && isSimpleMemberExpression(expression.object);
  }
github alan-ai / alan-sdk-reactnative / testtools / node_modules / @babel / plugin-transform-spread / lib / index.js View on Github external
CallExpression(path) {
        const {
          node,
          scope
        } = path;
        const args = node.arguments;
        if (!hasSpread(args)) return;
        const calleePath = (0, _helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("callee"));
        if (calleePath.isSuper()) return;
        let contextLiteral = scope.buildUndefinedNode();
        node.arguments = [];
        let nodes;

        if (args.length === 1 && args[0].argument.name === "arguments") {
          nodes = [args[0].argument];
        } else {
          nodes = build(args, scope);
        }

        const first = nodes.shift();

        if (nodes.length) {
          node.arguments.push(_core.types.callExpression(_core.types.memberExpression(first, _core.types.identifier("concat")), nodes));
        } else {

@babel/helper-skip-transparent-expression-wrappers

Helper which skips types and parentheses

MIT
Latest version published 17 days ago

Package Health Score

95 / 100
Full package analysis

Similar packages