babel-helper-remap-async-to-generator
Advanced tools
Comparing version 6.18.0 to 6.20.0
@@ -6,5 +6,5 @@ "use strict"; | ||
exports.default = function (path, helpers) { | ||
var node = path.node; | ||
var scope = path.scope; | ||
var parent = path.parent; | ||
var node = path.node, | ||
scope = path.scope, | ||
parent = path.parent; | ||
@@ -11,0 +11,0 @@ |
@@ -64,4 +64,4 @@ "use strict"; | ||
ForAwaitStatement: function ForAwaitStatement(path, _ref3) { | ||
var file = _ref3.file; | ||
var wrapAwait = _ref3.wrapAwait; | ||
var file = _ref3.file, | ||
wrapAwait = _ref3.wrapAwait; | ||
var node = path.node; | ||
@@ -75,4 +75,4 @@ | ||
var declar = build.declar; | ||
var loop = build.loop; | ||
var declar = build.declar, | ||
loop = build.loop; | ||
@@ -140,5 +140,14 @@ var block = loop.body; | ||
FUNCTION: built, | ||
PARAMS: node.params.map(function () { | ||
return path.scope.generateUidIdentifier("x"); | ||
}) | ||
PARAMS: node.params.reduce(function (acc, param) { | ||
acc.done = acc.done || !t.isIdentifier(param); | ||
if (!acc.done) { | ||
acc.params.push(path.scope.generateUidIdentifier("x")); | ||
} | ||
return acc; | ||
}, { | ||
params: [], | ||
done: false | ||
}).params | ||
}).expression; | ||
@@ -145,0 +154,0 @@ |
{ | ||
"name": "babel-helper-remap-async-to-generator", | ||
"version": "6.18.0", | ||
"version": "6.20.0", | ||
"description": "Helper function to remap async functions to generators", | ||
@@ -9,8 +9,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator", | ||
"dependencies": { | ||
"babel-runtime": "^6.0.0", | ||
"babel-runtime": "^6.20.0", | ||
"babel-template": "^6.16.0", | ||
"babel-types": "^6.18.0", | ||
"babel-traverse": "^6.18.0", | ||
"babel-types": "^6.20.0", | ||
"babel-traverse": "^6.20.0", | ||
"babel-helper-function-name": "^6.18.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9024
198
Updatedbabel-runtime@^6.20.0
Updatedbabel-traverse@^6.20.0
Updatedbabel-types@^6.20.0