# timedout-promise

> Timeout your promises

Latest version **1.0.0** (published 2017-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install timedout-promise
pnpm add timedout-promise
yarn add timedout-promise
bun add timedout-promise
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-07-16 |
| First published | 2017-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Oddoye |
| Maintainers | therealbrazee |
| Keywords | timeout, promises |

## Links

- npm: https://www.npmjs.com/package/timedout-promise
- npm.io page: https://npm.io/package/timedout-promise

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-07-16

## README

# Timedout Promise

Utility function to set a timeout in milliseconds for promises.

## Install
```
> yarn add timedout-promise
```

## Usage
```
const timedoutPromise = require('timedout-promise');

timedoutPromise(1000, fetch('https://foo.bar/fiz'))
  .then((data) => console.log(`${data.length} loaded before 1000ms`))
  .catch(() => console.log('Timed out in 1000ms'))

```

## Tests
```
> yarn test

---
_Source: https://npm.io/package/timedout-promise · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
