Socket
Socket
Sign inDemoInstall

babel-helper-remap-async-to-generator

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-remap-async-to-generator - npm Package Compare versions

Comparing version 6.1.2 to 6.1.4

8

lib/index.js

@@ -39,3 +39,3 @@ /* @flow */

function classMethod(path /*: NodePath*/, callId /*: Object*/) {
function classOrObjectMethod(path /*: NodePath*/, callId /*: Object*/) {
var node = path.node;

@@ -75,2 +75,4 @@ var body = node.body;

if (path.isFunctionDeclaration()) {
node.type = "FunctionExpression";
var declar = t.variableDeclaration("let", [t.variableDeclarator(t.identifier(asyncFnId.name), t.callExpression(container, []))]);

@@ -108,4 +110,4 @@ declar._blockHoist = true;

if (path.isClassMethod()) {
return classMethod(path, callId);
if (path.isClassMethod() || path.isObjectMethod()) {
return classOrObjectMethod(path, callId);
} else {

@@ -112,0 +114,0 @@ return plainFunction(path, callId);

{
"name": "babel-helper-remap-async-to-generator",
"version": "6.1.2",
"version": "6.1.4",
"description": "",

@@ -11,6 +11,6 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator",

"babel-template": "^6.0.16",
"babel-types": "^6.1.2",
"babel-traverse": "^6.1.2",
"babel-types": "^6.1.4",
"babel-traverse": "^6.1.4",
"babel-helper-function-name": "^6.0.15"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc