Comparing version 2.13.4 to 2.13.5
@@ -75,2 +75,3 @@ "use strict"; | ||
defaultParameters: require("./transformers/es6-default-parameters"), | ||
restParameters: require("./transformers/es6-rest-parameters"), | ||
destructuring: require("./transformers/es6-destructuring"), | ||
@@ -88,3 +89,2 @@ forOf: require("./transformers/es6-for-of"), | ||
generators: require("./transformers/es6-generators"), | ||
restParameters: require("./transformers/es6-rest-parameters"), | ||
@@ -91,0 +91,0 @@ protoToAssign: require("./transformers/optional-proto-to-assign"), |
@@ -44,2 +44,18 @@ "use strict"; | ||
// support patterns | ||
if (t.isPattern(rest)) { | ||
var pattern = rest; | ||
rest = file.generateUidIdentifier("ref", scope); | ||
// let the destructuring transformer handle this | ||
var restDeclar = t.variableDeclaration("var", [ | ||
t.variableDeclarator(pattern, rest) | ||
]); | ||
// retain evaluation position | ||
restDeclar._blockHoist = node.params.length + 1; | ||
node.body.body.unshift(restDeclar); | ||
} | ||
node.body.body.unshift( | ||
@@ -46,0 +62,0 @@ util.template("rest", { |
{ | ||
"name": "6to5", | ||
"description": "Turn ES6 code into readable vanilla ES5 with source maps", | ||
"version": "2.13.4", | ||
"version": "2.13.5", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
@@ -66,4 +66,4 @@ "homepage": "https://6to5.org/", | ||
"optionalDependencies": { | ||
"kexec": "0.2.0" | ||
"kexec": "1.1.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
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
1761752
14713