Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tj/node-thunkify
Turn a regular node function into one which returns a thunk
https://github.com/tj/node-thunkify
Last synced: 1 day ago
JSON representation
Turn a regular node function into one which returns a thunk
- Host: GitHub
- URL: https://github.com/tj/node-thunkify
- Owner: tj
- License: mit
- Created: 2013-10-14T19:22:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-25T19:03:46.000Z (over 6 years ago)
- Last Synced: 2024-10-30T04:49:51.627Z (3 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 858
- Watchers: 14
- Forks: 42
- Open Issues: 9
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - node-thunkify
README
# thunkify
Turn a regular node function into one which returns a thunk,
useful for generator-based flow control such as [co](https://github.com/visionmedia/co).## Installation
```
$ npm install thunkify
```## Example
```js
var thunkify = require('thunkify');
var fs = require('fs');var read = thunkify(fs.readFile);
read('package.json', 'utf8')(function(err, str){
});
```# License
MIT