babel-plugin-transform-es2015-destructuring
Advanced tools
Comparing version 6.16.0 to 6.18.0
@@ -481,3 +481,32 @@ "use strict"; | ||
path.replaceWithMultiple(nodes); | ||
var nodesOut = []; | ||
for (var _iterator5 = nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, _getIterator3.default)(_iterator5);;) { | ||
var _ref7; | ||
if (_isArray5) { | ||
if (_i5 >= _iterator5.length) break; | ||
_ref7 = _iterator5[_i5++]; | ||
} else { | ||
_i5 = _iterator5.next(); | ||
if (_i5.done) break; | ||
_ref7 = _i5.value; | ||
} | ||
var _node = _ref7; | ||
var tail = nodesOut[nodesOut.length - 1]; | ||
if (tail && t.isVariableDeclaration(tail) && t.isVariableDeclaration(_node) && tail.kind === _node.kind) { | ||
var _tail$declarations; | ||
(_tail$declarations = tail.declarations).push.apply(_tail$declarations, _node.declarations); | ||
} else { | ||
nodesOut.push(_node); | ||
} | ||
} | ||
if (nodesOut.length === 1) { | ||
path.replaceWith(nodesOut[0]); | ||
} else { | ||
path.replaceWithMultiple(nodesOut); | ||
} | ||
} | ||
@@ -484,0 +513,0 @@ } |
{ | ||
"name": "babel-plugin-transform-es2015-destructuring", | ||
"version": "6.16.0", | ||
"version": "6.18.0", | ||
"description": "Compile ES2015 destructuring to ES5", | ||
@@ -15,4 +15,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-destructuring", | ||
"devDependencies": { | ||
"babel-helper-plugin-test-runner": "^6.8.0" | ||
"babel-helper-plugin-test-runner": "^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
16888
390