Closed bsiddiqui closed 9 years ago
You should take advantage of Promises for readable flow control and go with the latter style. A good promise library (e.g. Bluebird) will realize that format
isn't returning a thenable and introduce some performance optimizations.
👍
If you have a function you want to call on the result of a promise, is there any downside to adding it to the promise chain?
i.e. given some format function that doesn't return a promise
is there any reason you should do
instead of
the former avoids adding another promise to the chain but the ladder looks cleaner