Check if the environment supports { ...a } spread syntax (evacuated from NSA/Microsoft Github)
|
7 лет назад | |
---|---|---|
.gitignore | 7 лет назад | |
.travis.yml | 7 лет назад | |
CHANGELOG.md | 7 лет назад | |
LICENSE.md | 7 лет назад | |
README.md | 7 лет назад | |
index.js | 7 лет назад | |
package.json | 7 лет назад | |
test.js | 7 лет назад |
check if the environment supports { ...a }
spread syntax
npm install has-object-spread
var hasObjectSpread = require('has-object-spread')
if (hasObjectSpread()) {
clone = Function('object', '({ ...object })')
}