How to use the esprima-fb.Syntax.ThisExpression function in esprima-fb

To help you get started, we’ve selected a few esprima-fb 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 guptag / FinCharts / app / node_modules / react / node_modules / envify / node_modules / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
renderParams(traverse, node, path, state);

  // Skip arrow.
  utils.catchupWhiteSpace(node.body.range[0], state);

  var renderBody = node.body.type == Syntax.BlockStatement
    ? renderStatementBody
    : renderExpressionBody;

  path.unshift(node);
  renderBody(traverse, node, path, state);
  path.shift();

  // Bind the function only if `this` value is used
  // inside it or inside any sub-expression.
  if (utils.containsChildOfType(node.body, Syntax.ThisExpression)) {
    utils.append('.bind(this)', state);
  }

  utils.catchupWhiteSpace(node.range[1], state);

  // Close wrapper if not in the expression.
  if (notInExpression) {
    utils.append(')', state);
  }

  return false;
}
github joshuaslate / saas-tutorial / node_modules / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
utils.containsChildMatching(node.body, function(node) {
      return node.type === Syntax.ThisExpression
             || (node.type === Syntax.Identifier
                 && node.name === "super");
    });
github Zach417 / churchetto-web / node_modules / envify / node_modules / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
utils.containsChildMatching(node.body, function(node) {
      return node.type === Syntax.ThisExpression
             || (node.type === Syntax.Identifier
                 && node.name === "super")
             || (node.type === Syntax.JSXIdentifier
                 && node.name === 'this');
    });
github facebookarchive / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
utils.containsChildMatching(node.body, function(node) {
      return node.type === Syntax.ThisExpression
             || (node.type === Syntax.Identifier
                 && node.name === "super")
             || (node.type === Syntax.JSXIdentifier
                 && node.name === 'this');
    });
github Caltech-IPAC / firefly / node_modules / react / node_modules / envify / node_modules / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
utils.containsChildMatching(node.body, function(node) {
      return node.type === Syntax.ThisExpression
             || (node.type === Syntax.Identifier
                 && node.name === "super");
    });
github andrewshawcare / thoughtworks-email-signature-generator / node_modules / jsxhint / node_modules / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
utils.containsChildMatching(node.body, function(node) {
      return node.type === Syntax.ThisExpression
             || (node.type === Syntax.Identifier
                 && node.name === "super");
    });
github zillow / react-slider / node_modules / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
utils.containsChildMatching(node.body, function(node) {
      return node.type === Syntax.ThisExpression
             || (node.type === Syntax.Identifier
                 && node.name === "super")
             || (node.type === Syntax.JSXIdentifier
                 && node.name === 'this');
    });
github Lapple / ErrorBoard / node_modules / react-tools / node_modules / jstransform / visitors / es6-arrow-function-visitors.js View on Github external
utils.containsChildMatching(node.body, function(node) {
      return node.type === Syntax.ThisExpression
             || (node.type === Syntax.Identifier
                 && node.name === "super");
    });