value-descriptors-factory

0.1.0 • Public • Published

value-descriptors-factory

travis ci npm version Coverage Status Dependency Status

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

Package Sidebar

Install

npm i value-descriptors-factory

Weekly Downloads

3

Version

0.1.0

License

MIT

Last publish

Collaborators

  • xgbuils