@tinyhttp/etag
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
5677
0