value-descriptors-factory
v0.1.0
Published
building Object.defineProperties value descriptors without verbosity
Downloads
2
Maintainers
Readme
value-descriptors-factory
value-descriptors-factory
exports a function that builds Object.degineProperties
value descriptors without verbosity.
Install
$ npm install value-descriptors-factory --save
Usage
const vdf = require('value-descriptors-factory')
const obj1 = Object.defineProperties(vdf({
foo: 'bar',
fizz: 'buzz'
}))
// is equivalent to
const obj2 = Object.defineProperties({
foo: {
value: 'bar',
},
fizz: {
value: 'buzz'
}
}))
Support
- Node.js >=6
- ES2015 transpilers
License
MIT