koa-etag
Koa ETag support middleware
Last updated a year ago by 3imed-jaberi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install koa-etag 
SYNC missed versions from official npm registry.

koa-etag

NPM version Test coverage Dependency Status License Downloads

Etag support for Koa responses using etag.

Please use @koa/etag (v5+) instead. It is the same module, and this package will be deprecated in the next major release.

Installation

# npm
$ npm install koa-etag
# yarn
$ yarn add koa-etag

Example


const Koa = require('koa');
const etag = require('koa-etag');
const conditional = require('koa-conditional-get');
const compress = require('koa-compress');

const app = new Koa();

// must be used before `conditional` and `etag`
app.use(compress());

// etag works together with conditional-get
app.use(conditional());
app.use(etag());

app.use(function (ctx) {
  ctx.body = 'Hello World';
});

app.listen(3000);

console.log('listening on port 3000');

License

MIT

Current Tags

  • 5.0.0                                ...           latest (a year ago)
  • 3.0.0                                ...           next (11 years ago)
  • 2.1.2                                ...           v2 (9 years ago)

16 Versions

  • 5.0.0                                ...           a year ago
  • 4.0.0                                ...           6 years ago
  • 2.1.2                                ...           9 years ago
  • 2.1.1                                ...           11 years ago
  • 3.0.0                                ...           11 years ago
  • 2.1.0                                ...           11 years ago
  • 2.0.0                                ...           12 years ago
  • 1.3.1                                ...           12 years ago
  • 1.3.0                                ...           12 years ago
  • 1.2.5                                ...           12 years ago
  • 1.2.4                                ...           13 years ago
  • 1.2.3                                ...           13 years ago
  • 1.2.2                                ...           13 years ago
  • 1.2.1                                ...           13 years ago
  • 1.1.0                                ...           13 years ago
  • 1.0.0                                ...           13 years ago
Downloads
Total 41
Today 0
This Week 0
This Month 19
Last Day 0
Last Week 17
Last Month 2
Dependencies (2)
Dev Dependencies (16)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE