0.1.14 • Published 8 months ago

@3xpo/timedout v0.1.14

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@3xpo/timedout

Compromise-less Microlibrary for making promises with timeouts.

Installation

pnpm i @3xpo/timedout;

Usage

import timedout from '@3xpo/timedout';

const promise = timedout(
  new Promise(resolve => setTimeout(() => resolve('hi!'), 500)),
  1000,
); // will resolve after 500ms, with 'hi!'
const promise2 = timedout(
  new Promise(resolve => setTimeout(() => resolve('hi!'), 10000)),
  1000,
); // will reject after 1s
0.1.14

8 months ago

0.1.13

9 months ago

0.1.12

9 months ago

0.1.10

11 months ago

0.1.11

11 months ago

0.1.9

11 months ago

0.1.8

11 months ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.5

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago