Get started with bluebird CDN

MIT licensed

Bluebird: Popular Node.js/browser promise library for advanced asynchronous task handling.

Tags:
  • promise
  • performance
  • fast
  • promises-aplus
  • async

Stable version

Copied!

How to start using bluebird CDN


// Import Bluebird using the provided CDN link
const Promise = require("bluebird");

// Sample array of numbers
const numbers = [1, 2, 3, 4, 5];

// Function to square a number
const square = num => Promise.resolve(num * num);

// Use Promise.map to apply the square function to each number in the array
Promise.map(numbers, square)
  .then(squaredNumbers => console.log(squaredNumbers))
  .catch(error => console.error(error));
Copied!
Copied!
Copied!
Copied!

All versions