promise.obj
v0.3.1
Published
promise.obj / promise.props etc
Downloads
114
Maintainers
Readme
promise.obj
promise.obj / promise.props etc
Install
$ npm i -S promise.obj
Note
this is target ES5 environment
API
const pobj = require('promise.obj')
Example
const pobj = require('promise.obj')
const p = pobj({
x: Promise.resolve('x'),
y: Promise.resolve('y'),
foo: 'foo',
bar: 3,
abc: null,
})
p.then(function(o) {
o.x // 'x'
o.y // 'y'
o.foo // 'foo'
o.bar // 3
o.abc // null
})
See Also
Changelog
License
the MIT License http://magicdawn.mit-license.org