# with-timeout

> Promisified, boilerplate-free setTimeout

Latest version **0.0.7** (published 2017-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install with-timeout
pnpm add with-timeout
yarn add with-timeout
bun add with-timeout
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2017-05-27 |
| First published | 2016-07-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Daniel Eisenbarger |
| Maintainers | danne931 |
| Keywords | with timeout, timeout, settimeout, promise, promisify, promisify settimeout, promisified, promisified settimeout |

## Links

- npm: https://www.npmjs.com/package/with-timeout
- Repository: https://github.com/danne931/with-timeout
- Homepage: https://github.com/danne931/with-timeout#readme
- Issues: https://github.com/danne931/with-timeout/issues
- npm.io page: https://npm.io/package/with-timeout

## Alternatives

- [@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
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.0.7 (latest) — 2017-05-27
- 0.0.6 — 2016-08-09
- 0.0.5 — 2016-07-31
- 0.0.4 — 2016-07-26
- 0.0.3 — 2016-07-26
- 0.0.2 — 2016-07-24
- 0.0.1 — 2016-07-24

## README

# with-timeout

Promisified, boilerplate-free setTimeout

[![Build Status](https://travis-ci.org/danne931/with-timeout.svg?branch=master)](https://travis-ci.org/danne931/with-timeout)
[![Coverage Status](https://coveralls.io/repos/github/danne931/with-timeout/badge.svg)](https://coveralls.io/github/danne931/with-timeout)
[![npm version](https://img.shields.io/npm/v/with-timeout.svg?style=flat-square)](https://www.npmjs.com/package/with-timeout)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
![](https://img.shields.io/badge/license-MIT-blue.svg)

## Install

```
$ npm install --save with-timeout
```

Not using Node or a module bundler? Use a UMD build via the `<script>` tag.
- [https://unpkg.com/with-timeout/dist/with-timeout.js](https://unpkg.com/with-timeout/dist/with-timeout.js)
- [https://unpkg.com/with-timeout/dist/with-timeout.min.js](https://unpkg.com/with-timeout/dist/with-timeout.min.js)

## Usage

```javascript
import withTimeout from 'with-timeout'

const fn = (firstName = 'Agent', lastName = 'Smith') =>
  `Hello ${firstName} ${lastName}`

// After 500ms - 'Hello Agent Smith'
withTimeout(fn).then(console.log)

// After 1000ms - 'Hello Keanu Reeves'
withTimeout(fn, 1000, 'Keanu', 'Reeves').then(console.log)
```

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