🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More →
Socket
Book a DemoInstallSign in
Socket

@koa/etag

Package Overview
Dependencies
Maintainers
9
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koa/etag

Koa ETag support middleware

Source
npmnpm
Version
5.0.0
Version published
Weekly downloads
5.2K
-3.34%
Maintainers
9
Weekly downloads
 
Created
Source

koa-etag

NPM version Build status 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 conditional = require('koa-conditional-get');
const compress = require('koa-compress');
const etag = require('koa-etag');
const Koa = require('koa');
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

Keywords

koa

FAQs

Package last updated on 05 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts