matthewmueller/vo

Consistent function signatures

Closed this issue · 1 comments

Though sometimes "elegant", having variable function signatures is often confusing because
you're not sure what each argument represent. It also changes on you depending on what comes
before it (in pipeline mode).

Since callbacks are the only situation where you can actually have multiple return values,
(next(null, 'a', 'b')), those can resolve to an array and pass the signature (function (args, next)) to the next function (where args is [a, b]).

this is done in 4.0.0.

now in pipeline mode, the first argument changes with return values, all the other arguments are consistent.