Skip to content

Commit

Permalink
update usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Jun 5, 2015
1 parent b877754 commit 28cf39b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ npm test
```js
var promise2thunk = require('promise2thunk')
var parseJson = require('then-parse-json')

var promise = parseJson('{"foo":"bar"}')
var thunk = promise2thunk(promise)

thunk(function (err, res) {
console.log(err) //=> null
console.log(res) //=> { foo: 'bar' }
done()
})
```


Expand Down

0 comments on commit 28cf39b

Please sign in to comment.