Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement .spread in custom event emitter #1277
The spread function is almost a direct copy of .then, except that it transforms the arguments into an array.
We could have changed so that then would return an array of values if there are multiple return values, but I don't like that idea. First, it would break BC, for people who rely on and only need the first argument, and secondly, the way i see the promise spec, a promise can only return a single value
Also - back in PR business - woo! Docs comming shortly