ES6 Promises: Patterns and Anti-Patterns

Click for: original source

Bobby Brennan post about hot topic - Promises in ECMAScript 6 and specifically he writtes about Patterns and Anti-Patterns. Node.js has adopted the latest and greatest JavaScript features, and since v4 has supported Promises. But while Promises make code more concise and readable, they can be a bit daunting to those who are only familiar with callbacks.

Article then deals with Patterns and Best Practices, e.g.:

  • Using Promises
  • Promisifying callbacks
  • Promisifying values
  • Running in parallel
  • Running in series
  • Racing
  • Catching errors and more …

Excellent read. Follow to discover Anti-patterns plus all the demo code.

[Read More]

Tags javascript nodejs