/plushcap/analysis/bandwidth/bandwidth-building-a-node-js-module-with-promises-and-not-breaking-them

Building a Node.js module with promises (and not breaking them)

What's this blog post about?

The author maintains and contributes to the Node.js SDK for Bandwidth App Platform. They recently added built-in support for Promises in the upcoming version of the SDK, despite initial hesitation due to concerns about adding extra dependencies or forcing developers down a certain path. Promises help solve problems like the "pyramid of doom" and are mostly interchangeable across different libraries that implement the Promises/A+ spec. The author chose bluebird as the Promise library for the SDK due to its support for older versions of Node, speed, and optimization. Additionally, bluebird's .asCallback() function allows developers to use traditional callback style programming if desired. This provides flexibility for end users who may be more comfortable with callbacks or prefer Promises.

Company
Bandwidth

Date published
April 19, 2016

Author(s)
Nicko Guyer

Word count
979

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.