@0x2e757/promise-ext

Promises extended

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Jul 11, 2021May 16, 2018Minified + gzip package size for @0x2e757/promise-ext in KB

Readme

PromiseExt

Lightweight native promise wrapper that can be cancelled. Has no dependencies on other libraries.

TypeScript code transpiled to ES2015 JavaScript.

Install

npm i @0x2e757/promise-ext

Usage

New class PromiseExt mostly will by used same as regular Promise.

How to import

import PromiseExt from "@0x2e757/promise-ext";

Unique methods

timeout — wrapper around resolver using setTimeout;

cancel — function for preventing promise or its chain actions execution;

Unique static functions

wrap — creates wrapper for provided promise;

* all function will cancel all cancellable promises if any of them will fail.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.