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

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

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