Commit Graph

18 Commits

Author SHA1 Message Date
Sindre Sorhus 458618efa4 Require Node.js 12 and move to ESM 2021-04-07 00:38:12 +07:00
peja e26f08d43f
Make timeout clearable (#15)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2020-12-26 17:42:06 +07:00
Jan Buschtöns b98a872b13
Fix browser compatibility (#18) 2020-12-06 16:12:12 +07:00
Sindre Sorhus 3249b2f014 Require Node.js 10 2020-12-01 22:50:36 +07:00
Pedro Augusto de Paula Barbosa 085f437e49
Add `customTimers` option (#17)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
2020-12-01 22:40:53 +07:00
Sindre Sorhus a233d8cd1d Add support for passing in Infinity as `milliseconds`
Fixes #14
2019-09-17 22:09:28 +07:00
Dimitri Benin 695a09c4be Refactor TypeScript definition to CommonJS compatible export (#11) 2019-04-04 11:58:41 +07:00
Sindre Sorhus 0333387584 Meta tweaks 2019-03-12 15:21:47 +07:00
Dimitri Benin 9a429bc248 Require Node.js 8, add TypeScript definition (#10) 2019-03-12 15:17:11 +07:00
Ægir Örn Símonarson 7fc1cb3dd2 Catch error thrown in fallback (#8) 2017-11-28 21:05:54 +01:00
Kevin Mårtensson 0324327342 Cancel any cancelable input promises (#3) 2017-11-19 16:33:44 +07:00
Neek Sandhu 1a651607e1 Fix value check logic for ms arg (#5) 2017-11-19 16:27:16 +07:00
Sindre Sorhus b456b7994e Simplify the code by using `p-finally`
Closes #1
2017-07-02 03:41:51 +02:00
Sindre Sorhus 33c1e31d79 Make sure the timeout is positive 2017-05-14 22:03:00 +07:00
Sindre Sorhus 1547fe2c7f Define error name manually so it will work when minified 2017-05-14 21:59:23 +07:00
Sindre Sorhus 7d46b457c3 Allow `Infinity` timeout
Could be useful if the user doesn’t want a timeout based on a conditional.
2017-05-14 21:58:43 +07:00
Sindre Sorhus e6bed583f6 Simplify error 2016-11-23 11:57:27 +07:00
Sindre Sorhus b07580fbdb init 2016-10-21 13:42:17 +07:00