@0x2e757/promise-ext
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

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.

Package Sidebar

Install

npm i @0x2e757/promise-ext

Weekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

21.2 kB

Total Files

8

Last publish

Collaborators

  • 0x2e757