0.3.1 • Published 8 months ago

promise.obj v0.3.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 months ago

promise.obj

promise.obj / promise.props etc

Build Status Coverage Status npm version npm downloads npm license

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

CHANGELOG.md

License

the MIT License http://magicdawn.mit-license.org