JSPM

max-timeout

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11359
  • Score
    100M100P100Q134823F
  • License MIT

The max amount of milliseconds you can pass to `setTimeout()`

Package Exports

  • max-timeout

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (max-timeout) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

max-timeout Build Status

The max amount of milliseconds you can pass to setTimeout()

A value larger than the one returned from this module, 2147483647 (~25 days), is too big to fit into a signed 32-bit integer, which is how JS engines store it, and will cause overflow, resulting in the timeout being scheduled immediately.

Install

$ npm install --save max-timeout

Usage

const maxTimeout = require('max-timeout');

setTimeout(() => {}, maxTimeout);
  • delay - Delay a promise a specified amount of time

License

MIT © Sindre Sorhus