yfinkelstein/node-zookeeper — Issue #37: node-promise IS an npm module now
Author: MaxMotovilov
Created: 2012-02-24 17:38:41+00:00
State: open

Source here: https://github.com/MaxMotovilov/node-promise. I couldn't stand to redistribute by copy so took matters into my own hands :-)

It is a straight fork with 1 significant change so far: Kris's all() does not work with non-promise arguments -- mine does (basically the same way as when()). Also I have added an alternative version of all() called allOrNone() which resolves to an error (i.e. reject()-s) if ANY of the arguments fail. Kris's version simply resolves failed arguments to instances of Error which I found inconsistent with the overall pattern but decided not to break the backward compatibility and added the alternative API.

I have to echo your appreciation of the promise concept -- I have worked with the original Deferred in Twisted and with its descendant in Dojo Toolkit so the first thing I did when I came to Node was to look for an implementation of the same concept -- as it turns out, from the same source as the one in Dojo... makes async code almost as simple as the sync version!