webpack/test/helpers/supportsIteratorDestructuri...

9 lines
189 B
JavaScript
Raw Normal View History

module.exports = function supportsIteratorDestructuring() {
try {
var f = eval("(function f([, x, ...y]) { return x; })");
return f([1, 2]) === 2;
2019-08-22 19:26:45 +08:00
} catch (e) {
return false;
}
};