🐦 Bluebird alternative within ~200 loc

Overview

NativeBird

Ultralight promise extension compatible with Bluebird

logo

Introduction

中文介绍

As a pioneer in JavaScript async ecosystem, Bluebird is a great userland promise library with handy utility methods included. However the way it works leads to larger bundle size and more verbose stack trace.

NativeBird is compatible with a core Bluebird subset by extending native promise, and all of its extended APIs (implemented within ~200 lines) are fully tested with the corresponding test cases in Bluebird.

NativeBird can be used in several scenarios:

  • To reuse promise utility methods like Promise.map and Promise.each without copying snippets from a gist.
  • To perform migration in existing Bluebird projects.
  • To simply learn JavaScript async operation skills 🐶 .

Installation

npm install nativebird
import Promise from "nativebird";

It's also fine to copy promise.mjs and its type definition directly into your project directory.

API

Since NativeBird inherits from native promise, all promise APIs defined in ECMAScript standard (say Promise.allSettled and Promise.any) are naturally supported.

Caveats

  • Promise.cancel is not supported.
  • Synchronous inspection (e.g. Promise.isFulfilled) is not supported.

Contribution

To implement a new API in Bluebird, please also port the corresponding test cases under test/mocha in Bluebird repo and test it with npm test.

License

MIT

You might also like...

Maintain your API development, documentation and experimentation all within your codebase.

Maintain your API development, documentation and experimentation all within your codebase.

dostman Maintain your API development, documentation and experimentation all within your codebase. This project is a new release! Feel free to contact

Mar 11, 2022

Team project within the course of Software System Design and Analysis.

Team project within the course of Software System Design and Analysis.

📗 InnoBookCrossing - Application for sharing books at Innopolis gh-md-toc 🔍 General Information Description The application is designed to help peop

Oct 22, 2022

A simple way to share files and clipboard within a local network.

Shortcut Simple way to share files and clipboard with devices within a local network. Usage Run the ./shortcut executable. A browser window will be op

Mar 13, 2022

This hook allows you to isolate and manage the state within the component, reducing rendering operations and keeping the source code concise.

React Hook Component State This hook allows you to isolate and manage the state within the component, reducing rendering operations and keeping the so

May 15, 2022

Search your code and 2M+ public repositories on Sourcegraph directly within Raycast.

 Search your code and 2M+ public repositories on Sourcegraph directly within Raycast.

Sourcegraph for Raycast Search your code and 2M+ public repositories on Sourcegraph directly within Raycast. Install · Setup · Commands · Issues · Cha

Jul 10, 2022

Create your own NFTs within seconds 🪄

MagicaNFT An automated process to create a number of NFTs At the moment, the program only makes pixelated NFTs, with only a certain number of characte

Feb 3, 2022

Codebraid Preview provides a Markdown preview for Pandoc documents within VS Code.

Codebraid Preview provides a Markdown preview for Pandoc documents within VS Code.

Codebraid Preview provides a Markdown preview for Pandoc documents within VS Code. Most Markdown previews don't support all of Pandoc's extensions to Markdown syntax. Codebraid Preview supports 100% of Pandoc features—because the preview is generated by Pandoc itself! There is also full bidirectional scroll sync and document export.

Dec 28, 2022

A simple NEXT.js app that lists NFTs within a contract address from a Buildable Flow.

NFT Marketplace Demo This is a basic Next.js app for listing NFTs in a given contract address. The purpose of this repository is to showcase the simpl

Dec 12, 2022

⚡️ A collection of open-source solution templates to integrate within Buildable Flows.

⚡️ A collection of open-source solution templates to integrate within Buildable Flows.

Buildable ⚡️ Buildable is an instant backend tool that makes a software developer’s day more delightful. We’re helping engineers breeze through featur

Dec 15, 2022

Plugin that lets you create diagrams from textual representation (aka 'Diagrams as Code') within Logseq

Plugin that lets you create diagrams from textual representation (aka 'Diagrams as Code') within Logseq

Logseq - Diagrams as Code Plugin that lets you create diagrams (and other visualizations) from textual representation (aka 'Diagrams as Code') within

Dec 21, 2022

NestJS + MikroORM example repository for testing within transactional contexts. Achieve a much faster test suite.

Description Nest NestJS + MikroORM example repository for testing within transactional contexts. Running tests in transactions will speedup your test

Dec 20, 2022

Smart contracts for DecentraMix.io, a cross-chain, non-custodial privacy-preserving protocol within the DecentraWorld ecosystem.

Smart contracts for DecentraMix.io, a cross-chain, non-custodial privacy-preserving protocol within the DecentraWorld ecosystem.

➡ DecentraMix.io Solidity Smart Contracts To get a better understanding of DecentraMix, we recommend to read about the technologies and privacy protoc

Apr 11, 2022

The Trino datasource allows to query and visualize Trino data from within Grafana.

Trino Grafana Data Source Plugin The Trino datasource allows to query and visualize Trino data from within Grafana. Getting started Drop this into Gra

Nov 3, 2022

A Discord bot that snitches on the lore & events, i.e. lies, about any two random users within a server.

A Discord bot that snitches on the lore & events, i.e. lies, about any two random users within a server.

Trash Panda Bot Trash Panda Bot A little trash panda to randomly post in your Discord server. Explore the docs » · Report Bug · Request Feature Table

May 29, 2022

A wrapper for valorant-api, a third-party API for getting data within Valorant. Available on npm

valorant-wrapper A wrapper for the third-party valorant-api How to Use All endpoints can be accessed off the ValAPI class. import { ValAPI } from 'val

Nov 7, 2022

A Kubernetes monitoring tool to visualize large-scale activity and real-time comprehensive metrics within your cluster.

A Kubernetes monitoring tool to visualize large-scale activity and real-time comprehensive metrics within your cluster.

Armada A light-weight Kubernetes health monitoring tool. Summary Armada is an open-source tool for monitoring the health of your Kubernetes cluster. I

Nov 2, 2022

Preview and reply to your messages from within Alfred. Keep your hands on that keyboard!

Preview and reply to your messages from within Alfred. Keep your hands on that keyboard!

Mouseless Messenger Mouseless Messenger offers you rapid keyboard-driven access to send and read conversations in the macOS Messages app via Alfred —

Dec 30, 2022

Use 1400+ 3dicons within Figma or Figjam files quickly

Use 1400+ 3dicons within Figma or Figjam files quickly

3dicons Figma plugin Use 1400+ 3dicons within Figma or Figjam files quickly. The icons can be searched and filtered by color and angle. Figma Communit

Dec 8, 2022
Owner
Yifeng Wang
雪碧 / GUI painter / if-else porter / console.log tester / TypeError creator
Yifeng Wang
:bird: :zap: Bluebird is a full featured promise library with unmatched performance.

Got a question? Join us on stackoverflow, the mailing list or chat on IRC Introduction Bluebird is a fully featured promise library with focus on inno

Petka Antonov 20.2k Dec 31, 2022
A set of high performance yield handlers for Bluebird coroutines

bluebird-co A set of high performance yield handlers for Bluebird coroutines. Description bluebird-co is a reimplementation of tj/co generator corouti

null 76 May 30, 2022
Its an app that uses a weather API with access to over 200,000 cities current weather conditons.

Weather App Its an app that uses a weather API with access to over 200,000 cities current weather conditons. Screenshots Links Live Site URL: live sit

Yusuf Lawal 5 Aug 17, 2022
Weather app made using openweather api that supports over 200,000 cities

About This is an open-source weather app built using React.js, and you are welcome to add your unique touch to this project by contributing to the rep

Nikhil Mishra 6 Oct 17, 2022
:bird: :zap: Bluebird is a full featured promise library with unmatched performance.

Got a question? Join us on stackoverflow, the mailing list or chat on IRC Introduction Bluebird is a fully featured promise library with focus on inno

Petka Antonov 20.2k Jan 5, 2023
:bird: :zap: Bluebird is a full featured promise library with unmatched performance.

Got a question? Join us on stackoverflow, the mailing list or chat on IRC Introduction Bluebird is a fully featured promise library with focus on inno

Petka Antonov 20.2k Dec 31, 2022
A set of high performance yield handlers for Bluebird coroutines

bluebird-co A set of high performance yield handlers for Bluebird coroutines. Description bluebird-co is a reimplementation of tj/co generator corouti

null 76 May 30, 2022
Load and save cookies within your React application

react-cookie Universal cookies for React universal-cookie Universal cookies for JavaScript universal-cookie-express Hook cookies get/set on Express fo

Reactive Stack 2.4k Dec 30, 2022
Visualization of all roads within any city

city-roads Render every single road in any city at once: https://anvaka.github.io/city-roads/ How it is made? The data is fetched from OpenStreetMap u

Andrei Kashcha 5.3k Jan 3, 2023
Dynamically set remote origins at runtime within hosts

external-remotes-plugin Host webpack.config const config = { ...otherConfigs plugins: [ new ModuleFederationPlugin({ name: "app1",

Module Federation 42 Nov 25, 2022