A Promise that acts just like an array, as you can invoke map and sort on it.. with chaining!
It implement all methods that async (https://github.com/caolan/async) supports, except reject, which is renamed to arrayReject. It also add supports for promises in any aspect of interaction with this api, and so with the async api. All based on the kew (https://github.com/Obvious/kew) promise implementation, but should work with like every Promises/A+ implementation that uses reject and resolve, or even the ones who don't (did not check that :s). Small example to show his promise-full-ness:
Q = require 'kew'require'arraypromise'installQdeferconstructor # Install does add the 'array' method on the given promise prototypedefered = Qdefer # Create a new promisedeferedarraymap # Notice there is no callback, still it's asyncQresolve value*7 # Make it return a promise, just to show promise-compatibilitythen # The result of .map() is also just a promise! :Dconsolelog result # log the resultr = Qresolve # Shortcut for making promises of valuesdeferedresolve r 1r 2r 3r 4# Resolve the promise with promises of 1, 2, 3 and 4
It is promised all over the place, ALL OVER! Awesome, isn't it? :D