https://github.com/magicdawn/promise.obj
promise.obj / promise.props
https://github.com/magicdawn/promise.obj
Last synced: about 1 year ago
JSON representation
promise.obj / promise.props
- Host: GitHub
- URL: https://github.com/magicdawn/promise.obj
- Owner: magicdawn
- License: mit
- Created: 2016-05-13T10:51:33.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-09-26T14:49:31.000Z (almost 3 years ago)
- Last Synced: 2025-06-04T03:35:34.247Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 74.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# promise.obj
> promise.obj / promise.props etc
[](https://travis-ci.org/magicdawn/promise.obj)
[](https://codecov.io/gh/magicdawn/promise.obj)
[](https://www.npmjs.com/package/promise.obj)
[](https://www.npmjs.com/package/promise.obj)
[](http://magicdawn.mit-license.org)
## Install
```sh
$ npm i -S promise.obj
```
## Note
this is target ES5 environment
## API
```js
const pobj = require('promise.obj')
```
## Example
```js
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
- [promise.timeout](https://github.com/magicdawn/promise.timeout)
- [promise.retry](https://github.com/magicdawn/promise.retry)
- [promise.map](https://github.com/magicdawn/promise.map)
- [promise.ify](https://github.com/magicdawn/promise.ify)
- [promise.cb](https://github.com/magicdawn/promise.cb)
- [promise.obj](https://github.com/magicdawn/promise.obj)
- [promise.sleep](https://github.com/magicdawn/promise.sleep)
## Changelog
[CHANGELOG.md](CHANGELOG.md)
## License
the MIT License http://magicdawn.mit-license.org