3 ms·
Have you looked into bluebird[1]? It and most of the available promise libraries have a nodify-esque function where you can simple do this: var fs = Promis
by JoshGlazebrook 13y ago
Have you looked into bluebird[1]? It and most of the available promise libraries have a nodify-esque function where you can simple do this:
var fs = Promise.promisifyAll(require("fs"));
And all of the regular methods in fs are now promisable. Q also seems to be one of the slowest[2] promise libraries there is. I'm not sure why so many people use it. That guy has a rather large benchmark table from a couple months ago as well and Q seems to be shockingly slow compared to the dozen or so other promise libraries out there.
1. https://github.com/petkaantonov/bluebird https://github.com/petkaantonov/bluebird
2. http://spion.github.io/posts/why-i-am-switching-to-promises.html http://spion.github.io/posts/why-i-am-switching-to-promises....