3 ms·
I recently wrote two Node.js libraries that use promises extensively, an Active Record style ORM http://bookshelfjs.org http://bookshelfjs.org and Query Builder
by tgriesser 13y ago
I recently wrote two Node.js libraries that use promises extensively, an Active Record style ORM http://bookshelfjs.org http://bookshelfjs.org and Query Builder http://knexjs.org http://knexjs.org. I actually didn't find a need for many of the higher level functions, outside of .then I'd typically stick to .all, .reject / .resolve, and occasionally .defer.
The source should be fairly annotated and is structured similar to Backbone.js, so it might be useful to take a look through and see where/how those functions are being used.