How to use @babel/helper-member-expression-to-functions - 2 common examples

To help you get started, we’ve selected a few @babel/helper-member-expression-to-functions 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-create-class-features-plugin / src / fields.js View on Github external
ref,
  path,
  privateNamesMap,
  loose,
  state,
) {
  const body = path.get("body");

  if (loose) {
    body.traverse(privateNameVisitor, {
      privateNamesMap,
      file: state,
      ...privateNameHandlerLoose,
    });
  } else {
    memberExpressionToFunctions(body, privateNameVisitor, {
      privateNamesMap,
      classRef: ref,
      file: state,
      ...privateNameHandlerSpec,
    });
  }
}
github babel / babel / packages / babel-helper-replace-supers / src / index.js View on Github external
replace() {
    const handler = this.isLoose ? looseHandlers : specHandlers;

    memberExpressionToFunctions(this.methodPath, visitor, {
      file: this.file,
      isStatic: this.isStatic,
      isPrivateMethod: this.isPrivateMethod,
      getObjectRef: this.getObjectRef.bind(this),
      superRef: this.superRef,
      ...handler,
    });
  }
}

@babel/helper-member-expression-to-functions

Helper function to replace certain member expressions with function calls

MIT
Latest version published 2 months ago

Package Health Score

95 / 100
Full package analysis

Popular @babel/helper-member-expression-to-functions functions

Similar packages