Package Exports
- etag
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (etag) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
etag
Create simple ETags
Installation
$ npm install etagAPI
var etag = require('etag')etag(entity, [options])
Generate a strong ETag for the given entity. This should be the complete
body of the entity. Strings, Buffers, and fs.Stats are accepted. By
default, a string or fs.Stats will generate a weak ETag while a Buffer
will generate a strong ETag (this can be overwritten by options.weak).
res.setHeader('ETag', etag(body))Options
etag accepts these properties in the options object.
weak
Specifies if a "strong" or a "weak" ETag will be generated. The ETag can only really be a strong as the given input.
Testing
$ npm test