How to use @babel/helper-explode-assignable-expression - 1 common examples

To help you get started, we’ve selected a few @babel/helper-explode-assignable-expression 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 babel / babel / packages / babel-helper-builder-binary-assignment-operator-visitor / src / index.js View on Github external
AssignmentExpression(path) {
      const { node, scope } = path;
      if (node.operator !== operator + "=") return;

      const nodes = [];
      const exploded = explode(node.left, nodes, this, scope);
      nodes.push(
        t.assignmentExpression(
          "=",
          exploded.ref,
          build(exploded.uid, node.right),
        ),
      );
      path.replaceWith(t.sequenceExpression(nodes));
    },

@babel/helper-explode-assignable-expression

Helper function to explode an assignable expression

MIT
Latest version published 3 years ago

Package Health Score

88 / 100
Full package analysis

Popular @babel/helper-explode-assignable-expression functions

Similar packages