Check if the environment supports { ...a } spread syntax (evacuated from NSA/Microsoft Github)

Renée Kooi 73676287c6 1.0.0 6 rokov pred
.gitignore ad626b4cf6 init 6 rokov pred
.travis.yml ad626b4cf6 init 6 rokov pred
CHANGELOG.md 73676287c6 1.0.0 6 rokov pred
LICENSE.md ad626b4cf6 init 6 rokov pred
README.md ad626b4cf6 init 6 rokov pred
index.js ad626b4cf6 init 6 rokov pred
package.json 73676287c6 1.0.0 6 rokov pred
test.js ad626b4cf6 init 6 rokov pred

README.md

has-object-spread

check if the environment supports { ...a } spread syntax

npm travis standard

Install

npm install has-object-spread

Usage

var hasObjectSpread = require('has-object-spread')

if (hasObjectSpread()) {
  clone = Function('object', '({ ...object })')
}

License

Apache-2.0