support SpreadElement in destructuring - fixes #128
This commit is contained in:
5
test/fixtures/transformation/destructuring/spread/actual.js
vendored
Normal file
5
test/fixtures/transformation/destructuring/spread/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var isSorted = ([x, y, ...wow]) => {
|
||||
if (!zs.length) return true
|
||||
if (y > x) return isSorted(zs)
|
||||
return false
|
||||
};
|
||||
11
test/fixtures/transformation/destructuring/spread/expected.js
vendored
Normal file
11
test/fixtures/transformation/destructuring/spread/expected.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var isSorted = function (_ref) {
|
||||
var x = _ref[0];
|
||||
var y = _ref[1];
|
||||
var wow = _ref.slice(2);
|
||||
|
||||
if (!zs.length) return true;
|
||||
if (y > x) return isSorted(zs);
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user