Promisify modules as you require them
Want to see pretty graphs? Log in now!
npm install qequire
|2||downloads in the last week|
|27||downloads in the last month|
|Last Published By|
|Version||0.0.2 last updated 9 months ago|
Promisify modules as you require them.
var qequire = require('qequire'); var fs = qequire('fs'); // methods on fs return promises // how crazy is that? fs.readFile('foo.txt').finally(console.log);
Warning: probably breaks stuff.
Promises are useful when you have a chain of async tasks and want predictable error handling.
Q provides some nice helpers. If you only want to wrap some APIs, you might want to check them out.