Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-bluebird

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-bluebird

Promisified utilities for node and the browser

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
2
Weekly downloads
 
Created
Source

async-bluebird

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.

Keywords

FAQs

Package last updated on 23 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc