Skip to content

Commit

Permalink
doc: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
magicdawn committed May 17, 2016
1 parent d6f5718 commit 5630233
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ npm i promise.obj --save

## API
```
const promiseObj = require('promise.obj');
const pobj = require('promise.obj');
const p = pobj({
x: Promise.resolve('x'),
y: Promise.resolve('y')
});
p.then(function(o){
o.x // 'x'
o.y // 'y'
})
```

## Changelog
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* main exports
*/

module.exports = function promiseObj(o, concurrency) {
module.exports = function promiseObj(o) {
var ks = Object.keys(o);
var result = {};

Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"bugs": {
"url": "https://github.com/magicdawn/promise.obj/issues"
},
"files": [
"index.js",
"package.json",
"README.md",
"LICENSE"
],
"homepage": "https://github.com/magicdawn/promise.obj#readme",
"dependencies": {},
"devDependencies": {
Expand Down

0 comments on commit 5630233

Please sign in to comment.