# koa-sleep

> Koa sleep delay middleware

Latest version **0.1.0** (published 2014-10-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install koa-sleep
pnpm add koa-sleep
yarn add koa-sleep
bun add koa-sleep
```

## 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.1.0 |
| Published | 2014-10-23 |
| First published | 2014-10-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Montana Flynn |
| Maintainers | montanaflynn |
| Keywords | koa, middleware, delay, sleep, timeout |

## Links

- npm: https://www.npmjs.com/package/koa-sleep
- Repository: https://github.com/montanaflynn/koa-sleep
- Issues: https://github.com/montanaflynn/koa-sleep/issues
- npm.io page: https://npm.io/package/koa-sleep

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2014-10-23
- 0.0.2 — 2014-10-23
- 0.0.1 — 2014-10-23

## README

# Koa Sleep Middleware

This koa middleware will "sleep" or delay moving forward for the defined timeout.

## Usage

Require the package and add it to your middleware pipeline. Takes an argument in the form of a integer representing milliseconds which defaults to 100 if none is provided.

```shell
npm install koa-sleep --save
```

```javascript
var koa = require('koa')
var sleep = require('koa-sleep')

var app = koa()
 
// Sleep for 500ms
app.use(sleep(500))

app.use(function *(next){
  this.body = 'Hello World'  
})

app.listen(1337)
```

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