-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
59 lines (59 loc) · 5.09 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"name": "etag",
"description": "Create simple ETags",
"version": "1.5.1",
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "David Björklund",
"email": "david.bjorklund@gmail.com"
}
],
"license": "MIT",
"keywords": [
"etag",
"http",
"res"
],
"repository": {
"type": "git",
"url": "https://github.com/jshttp/etag"
},
"dependencies": {
"crc": "3.2.1"
},
"devDependencies": {
"benchmark": "1.0.0",
"beautify-benchmark": "0.2.4",
"istanbul": "0.3.2",
"mocha": "~1.21.4",
"seedrandom": "~2.3.6"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"bench": "node benchmark/index.js",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
},
"readme": "# etag\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nCreate simple ETags\n\n## Installation\n\n```sh\n$ npm install etag\n```\n\n## API\n\n```js\nvar etag = require('etag')\n```\n\n### etag(entity, [options])\n\nGenerate a strong ETag for the given entity. This should be the complete\nbody of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By\ndefault, a strong ETag is generated except for `fs.Stats`, which will\ngenerate a weak ETag (this can be overwritten by `options.weak`).\n\n```js\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 a \"strong\" or a \"weak\" ETag will be generated. The ETag can only\nreally be a strong as the given input.\n\n## Testing\n\n```sh\n$ npm test\n```\n\n## Benchmark\n\n```bash\n$ npm run-script bench\n\n> etag@1.5.1 bench nodejs-etag\n> node benchmark/index.js\n\n> node benchmark/body0-100b.js\n\n 100B body\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n 4 tests completed.\n\n buffer - strong x 425,007 ops/sec ±1.47% (184 runs sampled)\n* buffer - weak x 1,009,859 ops/sec ±0.18% (197 runs sampled)\n string - strong x 442,096 ops/sec ±1.20% (181 runs sampled)\n string - weak x 325,063 ops/sec ±0.31% (192 runs sampled)\n\n> node benchmark/body1-1kb.js\n\n 1KB body\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n 4 tests completed.\n\n buffer - strong x 263,069 ops/sec ±1.60% (190 runs sampled)\n* buffer - weak x 295,732 ops/sec ±0.43% (199 runs sampled)\n string - strong x 274,822 ops/sec ±1.15% (191 runs sampled)\n string - weak x 169,473 ops/sec ±1.59% (194 runs sampled)\n\n> node benchmark/body2-5kb.js\n\n 5KB body\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n 4 tests completed.\n\n buffer - strong x 104,299 ops/sec ±0.60% (193 runs sampled)\n* buffer - weak x 108,126 ops/sec ±0.65% (196 runs sampled)\n string - strong x 101,736 ops/sec ±0.78% (194 runs sampled)\n string - weak x 101,266 ops/sec ±0.85% (192 runs sampled)\n\n> node benchmark/body3-10kb.js\n\n 10KB body\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n 4 tests completed.\n\n buffer - strong x 59,007 ops/sec ±0.29% (198 runs sampled)\n* buffer - weak x 60,968 ops/sec ±0.48% (197 runs sampled)\n string - strong x 51,873 ops/sec ±1.78% (178 runs sampled)\n string - weak x 52,307 ops/sec ±2.63% (193 runs sampled)\n\n> node benchmark/body4-100kb.js\n\n 100KB body\n\n 1 test completed.\n 2 tests completed.\n 3 tests completed.\n 4 tests completed.\n\n buffer - strong x 6,712 ops/sec ±0.11% (198 runs sampled)\n* buffer - weak x 6,716 ops/sec ±0.50% (196 runs sampled)\n string - strong x 6,397 ops/sec ±0.36% (196 runs sampled)\n string - weak x 6,635 ops/sec ±0.15% (198 runs sampled)\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/etag.svg?style=flat\n[npm-url]: https://npmjs.org/package/etag\n[node-version-image]: https://img.shields.io/node/v/etag.svg?style=flat\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/jshttp/etag.svg?style=flat\n[travis-url]: https://travis-ci.org/jshttp/etag\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/etag.svg?style=flat\n[downloads-url]: https://npmjs.org/package/etag\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/jshttp/etag/issues"
},
"homepage": "https://github.com/jshttp/etag",
"_id": "etag@1.5.1",
"_shasum": "54c50de04ee42695562925ac566588291be7e9ea",
"_resolved": "https://registry.npmjs.org/etag/-/etag-1.5.1.tgz",
"_from": "etag@>=1.5.1 <1.6.0"
}