1.0.4 • Published 6 years ago

async-bluebird v1.0.4

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

async-bluebird

npm version Build Status

A bluebird promisified wrap of async - async utitlities for node and the browser.

I made this because I felt like it's more productive than manually wrapping async functions with Promises every time I want to use them.

Install & Require:

  • npm i async-bluebird
// Promisified async & bluebird Promises
var {async, Promise} = require('async-bluebird');

// Just Promisified async
var async = require('async-bluebird');

Usage:

Example

// With callback:
async.each([1,2,3], (item, callback) => {
  // Callback on each item
}, (err) => {
  if (err) {
    // Handle error
  } else {
    // Success
  }
})

// With Promise:
async.each([1,2,3], (item, callback) => {
  // Callback on each item
}).then(() => {
  // Success
}).catch((err) => {
  // Handle error
});

Why use Promises?

Converting async's utility functions into Promises allows us to easily integrate them with our promise-using code and promise-chains.

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.1

10 years ago