webpack/test/helpers/supportsSpread.js

11 lines
167 B
JavaScript
Raw Normal View History

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