Debian Codegraph @

workspaces/arborist/test/fixtures/registry-mocks/content/on-headers.json

raw
1 {
2 "_id": "on-headers",
3 "_rev": "17-5e7360cec11987e1dd2598e3a2f11e09",
4 "name": "on-headers",
5 "description": "Execute a listener when a response is about to write headers",
6 "dist-tags": {
7 "latest": "1.0.2"
8 },
9 "versions": {
10 "0.0.0": {
11 "name": "on-headers",
12 "description": "Execute a listener when a response is about to write headers",
13 "version": "0.0.0",
14 "author": {
15 "name": "Douglas Christopher Wilson",
16 "email": "[email protected]"
17 },
18 "license": "MIT",
19 "keywords": [
20 "event",
21 "headers",
22 "http",
23 "onheaders"
24 ],
25 "repository": {
26 "type": "git",
27 "url": "https://github.com/expressjs/on-headers.git"
28 },
29 "bugs": {
30 "url": "https://github.com/expressjs/on-headers/issues"
31 },
32 "dependencies": {},
33 "devDependencies": {
34 "mocha": "~1.18.2",
35 "supertest": "~0.12.1"
36 },
37 "engines": {
38 "node": ">= 0.8.0"
39 },
40 "scripts": {
41 "test": "mocha --reporter spec test/"
42 },
43 "homepage": "https://github.com/expressjs/on-headers",
44 "_id": "[email protected]",
45 "dist": {
46 "shasum": "ee2817f8344325785cd9c2df2b242bbc17caf4c4",
47 "tarball": "https://registry.npmjs.org/on-headers/-/on-headers-0.0.0.tgz"
48 },
49 "_from": ".",
50 "_npmVersion": "1.4.3",
51 "_npmUser": {
52 "name": "dougwilson",
53 "email": "[email protected]"
54 },
55 "maintainers": [
56 {
57 "name": "dougwilson",
58 "email": "[email protected]"
59 }
60 ],
61 "directories": {}
62 },
63 "1.0.0": {
64 "name": "on-headers",
65 "description": "Execute a listener when a response is about to write headers",
66 "version": "1.0.0",
67 "author": {
68 "name": "Douglas Christopher Wilson",
69 "email": "[email protected]"
70 },
71 "license": "MIT",
72 "keywords": [
73 "event",
74 "headers",
75 "http",
76 "onheaders"
77 ],
78 "repository": {
79 "type": "git",
80 "url": "https://github.com/jshttp/on-headers"
81 },
82 "dependencies": {},
83 "devDependencies": {
84 "istanbul": "0.3.0",
85 "mocha": "~1.21.4",
86 "supertest": "~0.13.0"
87 },
88 "engines": {
89 "node": ">= 0.8.0"
90 },
91 "scripts": {
92 "test": "mocha --reporter spec --bail --check-leaks test/",
93 "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
94 "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
95 },
96 "gitHead": "434950a0748cd38bf9a04f3fd4f3ff89cf565fda",
97 "bugs": {
98 "url": "https://github.com/jshttp/on-headers/issues"
99 },
100 "homepage": "https://github.com/jshttp/on-headers",
101 "_id": "[email protected]",
102 "_shasum": "2c75b5da4375513d0161c6052e7fcbe4953fca5d",
103 "_from": ".",
104 "_npmVersion": "1.4.21",
105 "_npmUser": {
106 "name": "dougwilson",
107 "email": "[email protected]"
108 },
109 "maintainers": [
110 {
111 "name": "dougwilson",
112 "email": "[email protected]"
113 }
114 ],
115 "dist": {
116 "shasum": "2c75b5da4375513d0161c6052e7fcbe4953fca5d",
117 "tarball": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.0.tgz"
118 },
119 "directories": {}
120 },
121 "1.0.1": {
122 "name": "on-headers",
123 "description": "Execute a listener when a response is about to write headers",
124 "version": "1.0.1",
125 "author": {
126 "name": "Douglas Christopher Wilson",
127 "email": "[email protected]"
128 },
129 "license": "MIT",
130 "keywords": [
131 "event",
132 "headers",
133 "http",
134 "onheaders"
135 ],
136 "repository": {
137 "type": "git",
138 "url": "https://github.com/jshttp/on-headers"
139 },
140 "dependencies": {},
141 "devDependencies": {
142 "istanbul": "0.3.21",
143 "mocha": "2.3.3",
144 "supertest": "1.1.0"
145 },
146 "files": [
147 "LICENSE",
148 "HISTORY.md",
149 "README.md",
150 "index.js"
151 ],
152 "engines": {
153 "node": ">= 0.8"
154 },
155 "scripts": {
156 "test": "mocha --reporter spec --bail --check-leaks test/",
157 "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
158 "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
159 },
160 "gitHead": "ab0156a979d72353cfe666cccb3639e016b00280",
161 "bugs": {
162 "url": "https://github.com/jshttp/on-headers/issues"
163 },
164 "homepage": "https://github.com/jshttp/on-headers",
165 "_id": "[email protected]",
166 "_shasum": "928f5d0f470d49342651ea6794b0857c100693f7",
167 "_from": ".",
168 "_npmVersion": "1.4.28",
169 "_npmUser": {
170 "name": "dougwilson",
171 "email": "[email protected]"
172 },
173 "maintainers": [
174 {
175 "name": "dougwilson",
176 "email": "[email protected]"
177 },
178 {
179 "name": "jongleberry",
180 "email": "[email protected]"
181 }
182 ],
183 "dist": {
184 "shasum": "928f5d0f470d49342651ea6794b0857c100693f7",
185 "tarball": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz"
186 },
187 "directories": {}
188 },
189 "1.0.2": {
190 "name": "on-headers",
191 "description": "Execute a listener when a response is about to write headers",
192 "version": "1.0.2",
193 "author": {
194 "name": "Douglas Christopher Wilson",
195 "email": "[email protected]"
196 },
197 "license": "MIT",
198 "keywords": [
199 "event",
200 "headers",
201 "http",
202 "onheaders"
203 ],
204 "repository": {
205 "type": "git",
206 "url": "git+https://github.com/jshttp/on-headers.git"
207 },
208 "devDependencies": {
209 "eslint": "5.14.1",
210 "eslint-config-standard": "12.0.0",
211 "eslint-plugin-import": "2.16.0",
212 "eslint-plugin-markdown": "1.0.0",
213 "eslint-plugin-node": "8.0.1",
214 "eslint-plugin-promise": "4.0.1",
215 "eslint-plugin-standard": "4.0.0",
216 "istanbul": "0.4.5",
217 "mocha": "6.0.1",
218 "supertest": "3.4.2"
219 },
220 "engines": {
221 "node": ">= 0.8"
222 },
223 "scripts": {
224 "lint": "eslint --plugin markdown --ext js,md .",
225 "test": "mocha --reporter spec --bail --check-leaks test/",
226 "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
227 "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
228 "version": "node scripts/version-history.js && git add HISTORY.md"
229 },
230 "gitHead": "c05140cde9bbce2127926752433271c6f3fe8787",
231 "bugs": {
232 "url": "https://github.com/jshttp/on-headers/issues"
233 },
234 "homepage": "https://github.com/jshttp/on-headers#readme",
235 "_id": "[email protected]",
236 "_npmVersion": "6.4.1",
237 "_nodeVersion": "8.15.0",
238 "_npmUser": {
239 "name": "dougwilson",
240 "email": "[email protected]"
241 },
242 "dist": {
243 "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
244 "shasum": "772b0ae6aaa525c399e489adfad90c403eb3c28f",
245 "tarball": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
246 "fileCount": 5,
247 "unpackedSize": 7538,
248 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb3EnCRA9TVsSAnZWagAAJ74P/1Wi5XP0E+17U7xu01zR\nnaF1VUbte8DFEouoT4ZgQH9ope94hmbAOW6QrMq2S0FxuTTzZFuDSyKBeQ2g\n2JrwURxitZGU36AX+WuPlQ5+Zw5pmDXk6UjdsA8DpNTOCE6T0N7mKS1KQFFH\nantgfK6JJSRYN1Pv0PIsLFrANaWo2j+tgu+c0Eir0fBk7dEe3Q82B9oaDpP8\nKuJ6jDLC7pz/qcJIdUErE6OaNknALNF0GaqW9ikJgthgZvNsMcA5jP7V3CVg\nmnO20iDAGuDRmTjPdDOThrLPX4oYF5p+xWO6LqxHr2oO/f+NrIRrlJu9JQeP\nFHhqCbh9LEBy6gcg7U+XgIuaFHO0Ujy0hu/rs39TowjuQOuQW9QR58UphGtY\ncDe4lRvwDf86XW+vT65ps/gSABNm8hO/ShPi2A5rVlxIPv+RSWrC3Ril+8CA\n6znvDPyrbB5MuAQB5CZ1Jq9Z0AJ+Js/iNrKjxEwaht1JWmH9LN2PzCe2Upk9\n/4s1u4FsPvExwRWyCDgUnvM3bcNg/ksz9E+OMs6B63I+ywW2iFnpXDzFVKLA\np2TB/bhfRYlgf0lK6KNy8B3Z+iTaPX9ie5aRimU7wZaml0jlh0kwzPxwJyPz\nSEI4ssy0yxHXw+d9DDBl4OOTycrM+fSIrL/qKkWaS/6foiGc/cMsgt/YYMww\nBpKq\r\n=27fC\r\n-----END PGP SIGNATURE-----\r\n"
249 },
250 "maintainers": [
251 {
252 "name": "dougwilson",
253 "email": "[email protected]"
254 }
255 ],
256 "directories": {},
257 "_npmOperationalInternal": {
258 "host": "s3://npm-registry-packages",
259 "tmp": "tmp/on-headers_1.0.2_1550807334461_0.2296705941712791"
260 },
261 "_hasShrinkwrap": false
262 }
263 },
264 "readme": "# on-headers\n\n[![NPM Version][npm-version-image]][npm-url]\n[![NPM Downloads][npm-downloads-image]][npm-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\nExecute a listener when a response is about to write headers.\n\n## Installation\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/). Installation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```sh\n$ npm install on-headers\n```\n\n## API\n\n<!-- eslint-disable no-unused-vars -->\n\n```js\nvar onHeaders = require('on-headers')\n```\n\n### onHeaders(res, listener)\n\nThis will add the listener `listener` to fire when headers are emitted for `res`.\nThe listener is passed the `response` object as it's context (`this`). Headers are\nconsidered to be emitted only once, right before they are sent to the client.\n\nWhen this is called multiple times on the same `res`, the `listener`s are fired\nin the reverse order they were added.\n\n## Examples\n\n```js\nvar http = require('http')\nvar onHeaders = require('on-headers')\n\nhttp\n .createServer(onRequest)\n .listen(3000)\n\nfunction addPoweredBy () {\n // set if not set by end of request\n if (!this.getHeader('X-Powered-By')) {\n this.setHeader('X-Powered-By', 'Node.js')\n }\n}\n\nfunction onRequest (req, res) {\n onHeaders(res, addPoweredBy)\n\n res.setHeader('Content-Type', 'text/plain')\n res.end('hello!')\n}\n```\n\n## Testing\n\n```sh\n$ npm test\n```\n\n## License\n\n[MIT](LICENSE)\n\n[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/on-headers/master\n[coveralls-url]: https://coveralls.io/r/jshttp/on-headers?branch=master\n[node-version-image]: https://badgen.net/npm/node/on-headers\n[node-version-url]: https://nodejs.org/en/download\n[npm-downloads-image]: https://badgen.net/npm/dm/on-headers\n[npm-url]: https://npmjs.org/package/on-headers\n[npm-version-image]: https://badgen.net/npm/v/on-headers\n[travis-image]: https://badgen.net/travis/jshttp/on-headers/master\n[travis-url]: https://travis-ci.org/jshttp/on-headers\n",
265 "maintainers": [
266 {
267 "name": "dougwilson",
268 "email": "[email protected]"
269 }
270 ],
271 "time": {
272 "modified": "2019-02-22T03:48:57.059Z",
273 "created": "2014-05-14T01:43:08.147Z",
274 "0.0.0": "2014-05-14T01:43:08.147Z",
275 "1.0.0": "2014-08-10T23:14:54.117Z",
276 "1.0.1": "2015-09-30T03:47:06.558Z",
277 "1.0.2": "2019-02-22T03:48:54.600Z"
278 },
279 "homepage": "https://github.com/jshttp/on-headers#readme",
280 "keywords": [
281 "event",
282 "headers",
283 "http",
284 "onheaders"
285 ],
286 "repository": {
287 "type": "git",
288 "url": "git+https://github.com/jshttp/on-headers.git"
289 },
290 "author": {
291 "name": "Douglas Christopher Wilson",
292 "email": "[email protected]"
293 },
294 "bugs": {
295 "url": "https://github.com/jshttp/on-headers/issues"
296 },
297 "license": "MIT",
298 "readmeFilename": "README.md",
299 "users": {
300 "tarunbk": true,
301 "henrytseng": true,
302 "carlosvillademor": true,
303 "mojaray2k": true,
304 "jimjin": true,
305 "rocket0191": true,
306 "shanewholloway": true
307 }
308 }