Socket
Socket
Sign inDemoInstall

@tinyhttp/etag

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/etag - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

8

package.json
{
"name": "@tinyhttp/etag",
"version": "2.0.2",
"version": "2.0.3",
"type": "module",

@@ -12,2 +12,5 @@ "description": "entity tag module",

},
"bugs": {
"url": "https://github.com/tinyhttp/tinyhttp/issues"
},
"types": "./dist/index.d.ts",

@@ -30,3 +33,4 @@ "exports": "./dist/index.js",

"build": "rollup -c ../../build/defaultConfig.js"
}
},
"readme": "# @tinyhttp/etag\n\n[![npm (scoped)](https://img.shields.io/npm/v/@tinyhttp/etag?style=flat-square)](https://npmjs.com/package/@tinyhttp/etag) [![npm](https://img.shields.io/npm/dt/@tinyhttp/etag?style=flat-square)](https://npmjs.com/package/@tinyhttp/etag) [![](https://img.shields.io/badge/website-visit-hotpink?style=flat-square)](https://tinyhttp.v1rtl.site/mw/etag)\n\n> A rewrite of [etag](https://www.npmjs.com/package/etag) module.\n\nThis module generates HTTP ETags (as defined in RFC 7232) for use in HTTP responses.\n\n## Install\n\n```sh\npnpm i @tinyhttp/etag\n```\n\n## API\n\n```ts\nimport { eTag } from '@tinyhttp/etag'\n```\n\n`eTag(entity, [options])`\n\nGenerate a strong ETag for the given entity. This should be the complete body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By default, a strong ETag is generated except for `fs.Stats`, which will generate a weak ETag (this can be overwritten by options.weak).\n\n```ts\nres.setHeader('ETag', eTag(body))\n```\n\n### Options\n\n`eTag` accepts these properties in the options object.\n\n#### `weak`\n\nSpecifies if the generated ETag will include the weak validator mark (that is, the leading `W/`). The actual entity tag is the same. The default value is `false`, unless the entity is `fs.Stats`, in which case it is `true`.\n"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc