# koa-conditional-get

> Conditional GET support for koa

Latest version **3.0.0** (published 2020-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install koa-conditional-get
pnpm add koa-conditional-get
yarn add koa-conditional-get
bun add koa-conditional-get
```

## Health

**Score 38/100 (D)** — status: abandoned.

Positive: has types package; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2020-09-10 |
| First published | 2013-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/koa-conditional-get) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 60 |
| Maintainers | aheckmann, coderhaoxin, niftylettuce, juliangruber, eivifj, dead_horse, tjholowaychuk, jongleberry, fengmk2 |
| Keywords | koa, middleware, cache, caching, etag |

## Links

- npm: https://www.npmjs.com/package/koa-conditional-get
- Repository: https://github.com/koajs/conditional-get
- Homepage: https://github.com/koajs/conditional-get#readme
- Issues: https://github.com/koajs/conditional-get/issues
- npm.io page: https://npm.io/package/koa-conditional-get

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2020-09-10
- 1.0.4 (v1) — 2017-08-21
- 2.0.0 (next) — 2016-03-20
- 1.0.3 — 2015-05-26
- 1.0.2 — 2014-04-06
- 1.0.1 — 2013-12-23
- 1.0.0 — 2013-09-14

## README

# koa-conditional-get 

[![Build Status](https://travis-ci.org/koajs/conditional-get.png)](https://travis-ci.org/koajs/conditional-get)

Conditional GET support for koa.


## Installation

```bash
# npm
$ npm install koa-conditional-get
# yarn
$ yarn add koa-conditional-get
```


## Example

```js
const conditional = require('koa-conditional-get');
const etag = require('koa-etag');
const Koa = require('koa');
const app = new Koa();

// use it upstream from etag so
// that they are present
app.use(conditional());

// add etags
app.use(etag());

// respond
app.use(async function(ctx, next){
  await next();

  ctx.body = {
    name: 'tobi',
    species: 'ferret',
    age: 2
  };
})

app.listen(
  3000,
  console.log('listening on port 3000')
)
```

## License

[MIT](LICENSE)

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