javascript - Difference between done() vs spread() of bluebird -
hi not getting difference of spread() vs done() of bluebird library of javascript.even bluebird wrapper of q q has both functions in it's library.
can explain me difference between both of these functions?
thanks in advance !
even bluebird wrapper of q so…
oh, not. hope doesn't invalidate question?
i not getting difference of
spread()vsdone()?
the api docs might lot:
spread"like calling.then, fulfillment value or rejection reason must array, flattened formal parameters of handlers."if have promise array,
spreadcall callbacks multiple arguments.it's same q does:
spread"likethen, "spreads" array variadic fulfillment handler."done"like.then(), unhandled rejection ends here thrown error. [… it] used explicitly mark end of promise chain."more details on can found in error handling documentation. notice bluebird quite different q here, smartly figures out unhandled rejection , reports them on own - don't have explicitly tell throw global error when rejection got point.
compare q's
donedocumentation, recommends unconfined use.
as can see, spread , done different methods different purposes. also, done patterns differ between bluebird , q.
Comments
Post a Comment