|
il y a 5 ans | |
---|---|---|
.. | ||
test | il y a 5 ans | |
.npmignore | il y a 5 ans | |
History.md | il y a 5 ans | |
Makefile | il y a 5 ans | |
Readme.md | il y a 5 ans | |
index.js | il y a 5 ans | |
package.json | il y a 5 ans |
Turn a regular node function into one which returns a thunk, useful for generator-based flow control such as co.
$ npm install thunkify
var thunkify = require('thunkify');
var fs = require('fs');
var read = thunkify(fs.readFile);
read('package.json', 'utf8')(function(err, str){
});
MIT