webpack/test/helpers/supportsSpread.js

11 lines
170 B
JavaScript
Raw Normal View History

module.exports = function supportsSpread() {
try {
2024-07-31 09:56:53 +08:00
var x = { a: true };
var y;
eval("y = { ...x }");
return y !== x && y.a;
2019-08-22 19:26:45 +08:00
} catch (e) {
return false;
}
};