Gathering detailed insights and metrics for etag
Gathering detailed insights and metrics for etag
Gathering detailed insights and metrics for etag
Gathering detailed insights and metrics for etag
npm install etag
98.7
Supply Chain
99.4
Quality
77.9
Maintenance
100
Vulnerability
100
License
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
257 Stars
144 Commits
32 Forks
14 Watching
1 Branches
26 Contributors
Updated on 26 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-5.8%
5,801,148
Compared to previous day
Last week
2.1%
33,960,379
Compared to previous week
Last month
7.8%
141,001,735
Compared to previous month
Last year
5.9%
1,476,997,264
Compared to previous year
Create simple HTTP ETags
This module generates HTTP ETags (as defined in RFC 7232) for use in HTTP responses.
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
1$ npm install etag
1var etag = require('etag')
Generate 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
).
1res.setHeader('ETag', etag(body))
etag
accepts these properties in the options object.
Specifies 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
.
1$ npm test
1$ npm run-script bench 2 3> etag@1.8.1 bench nodejs-etag 4> node benchmark/index.js 5 6 http_parser@2.7.0 7 node@6.11.1 8 v8@5.1.281.103 9 uv@1.11.0 10 zlib@1.2.11 11 ares@1.10.1-DEV 12 icu@58.2 13 modules@48 14 openssl@1.0.2k 15 16> node benchmark/body0-100b.js 17 18 100B body 19 20 4 tests completed. 21 22 buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled) 23 buffer - weak x 263,812 ops/sec ±0.61% (184 runs sampled) 24 string - strong x 259,955 ops/sec ±1.19% (185 runs sampled) 25 string - weak x 264,356 ops/sec ±1.09% (184 runs sampled) 26 27> node benchmark/body1-1kb.js 28 29 1KB body 30 31 4 tests completed. 32 33 buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled) 34 buffer - weak x 190,586 ops/sec ±0.81% (186 runs sampled) 35 string - strong x 144,272 ops/sec ±0.96% (188 runs sampled) 36 string - weak x 145,380 ops/sec ±1.43% (187 runs sampled) 37 38> node benchmark/body2-5kb.js 39 40 5KB body 41 42 4 tests completed. 43 44 buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled) 45 buffer - weak x 92,373 ops/sec ±0.58% (189 runs sampled) 46 string - strong x 48,850 ops/sec ±0.56% (186 runs sampled) 47 string - weak x 49,380 ops/sec ±0.56% (190 runs sampled) 48 49> node benchmark/body3-10kb.js 50 51 10KB body 52 53 4 tests completed. 54 55 buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled) 56 buffer - weak x 56,148 ops/sec ±0.55% (190 runs sampled) 57 string - strong x 27,345 ops/sec ±0.43% (188 runs sampled) 58 string - weak x 27,496 ops/sec ±0.45% (190 runs sampled) 59 60> node benchmark/body4-100kb.js 61 62 100KB body 63 64 4 tests completed. 65 66 buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled) 67 buffer - weak x 7,115 ops/sec ±0.26% (191 runs sampled) 68 string - strong x 3,068 ops/sec ±0.34% (190 runs sampled) 69 string - weak x 3,096 ops/sec ±0.35% (190 runs sampled) 70 71> node benchmark/stats.js 72 73 stat 74 75 4 tests completed. 76 77 real - strong x 871,642 ops/sec ±0.34% (189 runs sampled) 78 real - weak x 867,613 ops/sec ±0.39% (190 runs sampled) 79 fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled) 80 fake - weak x 400,100 ops/sec ±0.47% (188 runs sampled)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More