SkillAgentSearch skills...

Etag

ETag support for Koa responses

Install / Use

/learn @koajs/Etag
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

@koa/etag

NPM version Test coverage Dependency Status License Downloads

Etag support for Koa responses using etag.

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

Related Skills

View on GitHub
GitHub Stars114
CategoryCustomer
Updated24d ago
Forks16

Languages

TypeScript

Security Score

95/100

Audited on Mar 10, 2026

No findings