# kork

> crude rate limiter - experimental

Latest version **0.1.0** (published 2016-08-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install kork
pnpm add kork
yarn add kork
bun add kork
```

## 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 | 2016-08-16 |
| First published | 2016-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Karl Pokus |
| Maintainers | karlpokus |
| Keywords | rate, limiter |

## Links

- npm: https://www.npmjs.com/package/kork
- Repository: https://github.com/karlpokus/kork
- Homepage: https://github.com/karlpokus/kork#readme
- Issues: https://github.com/karlpokus/kork/issues
- npm.io page: https://npm.io/package/kork

## Recent versions

- 0.1.0 (latest) — 2016-08-16

## README

# kork
A crude rate limiter for node. A work in progress. Very experimental. Not suitable for production (or anything really).

# install
```
$ npm i kork
```

# wat?
- Checks a global `ts` on each request
- If `rate` has not passed since last execution - makes current request wait for `rate` ms

# usage
```javascript
// require and set rate in ms
var kork = require('kork')(2500);
// use in express
app.use([path,] kork);
// use in pype stack
pype(null, [klocka, kork, getData, finalhandler])(req, res);
```

# old API
Keeping this for the records
```javascript
kork.init(rate) // sets new ts and applys rate limit in ms
kork.reset() // sets/overwrites ts
kork.limit() // checks ts
```

# todos
- add tests
- probably needs some kind of global queue

# licence
MIT

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