Open 0b10011 opened 11 years ago
Hrm, I like this...and having it on the static seems best. It'd be great if it were more generic, though, and didn't include "node" in the name.
WDYT about Promise.bind(func, scope?, style?)
where scope is an optional scope to bind the function to (Q's nbind
) and style is some arity or string that tells you about the conventions the function otherwise uses (one callback, two, etc.)?
Yeah, that would work for me!
Something like:
Q Docs: https://github.com/kriskowal/q#adapting-node
Q Code: https://github.com/kriskowal/q/blob/master/q.js#L1655-L1693