Debian Codegraph @

workspaces/arborist/test/fixtures/registry-mocks/content/once.json

raw
1 {
2 "_id": "once",
3 "_rev": "63-a48eeb93fd608223f718b1cfccab7802",
4 "name": "once",
5 "description": "Run a function exactly one time",
6 "dist-tags": {
7 "latest": "1.4.0"
8 },
9 "versions": {
10 "1.1.1": {
11 "name": "once",
12 "version": "1.1.1",
13 "description": "Run a function exactly one time",
14 "main": "once.js",
15 "directories": {
16 "test": "test"
17 },
18 "dependencies": {},
19 "devDependencies": {
20 "tap": "~0.3.0"
21 },
22 "scripts": {
23 "test": "tap test/*.js"
24 },
25 "repository": {
26 "type": "git",
27 "url": "git://github.com/isaacs/once"
28 },
29 "keywords": [
30 "once",
31 "function",
32 "one",
33 "single"
34 ],
35 "author": {
36 "name": "Isaac Z. Schlueter",
37 "email": "[email protected]",
38 "url": "http://blog.izs.me/"
39 },
40 "license": "BSD",
41 "_id": "[email protected]",
42 "dist": {
43 "shasum": "9db574933ccb08c3a7614d154032c09ea6f339e7",
44 "tarball": "https://registry.npmjs.org/once/-/once-1.1.1.tgz"
45 },
46 "_npmVersion": "1.1.48",
47 "_npmUser": {
48 "name": "isaacs",
49 "email": "[email protected]"
50 },
51 "maintainers": [
52 {
53 "name": "isaacs",
54 "email": "[email protected]"
55 }
56 ]
57 },
58 "1.2.0": {
59 "name": "once",
60 "version": "1.2.0",
61 "description": "Run a function exactly one time",
62 "main": "once.js",
63 "directories": {
64 "test": "test"
65 },
66 "dependencies": {},
67 "devDependencies": {
68 "tap": "~0.3.0"
69 },
70 "scripts": {
71 "test": "tap test/*.js"
72 },
73 "repository": {
74 "type": "git",
75 "url": "git://github.com/isaacs/once"
76 },
77 "keywords": [
78 "once",
79 "function",
80 "one",
81 "single"
82 ],
83 "author": {
84 "name": "Isaac Z. Schlueter",
85 "email": "[email protected]",
86 "url": "http://blog.izs.me/"
87 },
88 "license": "BSD",
89 "bugs": {
90 "url": "https://github.com/isaacs/once/issues"
91 },
92 "_id": "[email protected]",
93 "dist": {
94 "shasum": "de1905c636af874a8fba862d9aabddd1f920461c",
95 "tarball": "https://registry.npmjs.org/once/-/once-1.2.0.tgz"
96 },
97 "_from": ".",
98 "_npmVersion": "1.3.7",
99 "_npmUser": {
100 "name": "isaacs",
101 "email": "[email protected]"
102 },
103 "maintainers": [
104 {
105 "name": "isaacs",
106 "email": "[email protected]"
107 }
108 ]
109 },
110 "1.3.0": {
111 "name": "once",
112 "version": "1.3.0",
113 "description": "Run a function exactly one time",
114 "main": "once.js",
115 "directories": {
116 "test": "test"
117 },
118 "dependencies": {},
119 "devDependencies": {
120 "tap": "~0.3.0"
121 },
122 "scripts": {
123 "test": "tap test/*.js"
124 },
125 "repository": {
126 "type": "git",
127 "url": "git://github.com/isaacs/once"
128 },
129 "keywords": [
130 "once",
131 "function",
132 "one",
133 "single"
134 ],
135 "author": {
136 "name": "Isaac Z. Schlueter",
137 "email": "[email protected]",
138 "url": "http://blog.izs.me/"
139 },
140 "license": "BSD",
141 "bugs": {
142 "url": "https://github.com/isaacs/once/issues"
143 },
144 "_id": "[email protected]",
145 "dist": {
146 "shasum": "151af86bfc1f08c4b9f07d06ab250ffcbeb56581",
147 "tarball": "https://registry.npmjs.org/once/-/once-1.3.0.tgz"
148 },
149 "_from": ".",
150 "_npmVersion": "1.3.11",
151 "_npmUser": {
152 "name": "isaacs",
153 "email": "[email protected]"
154 },
155 "maintainers": [
156 {
157 "name": "isaacs",
158 "email": "[email protected]"
159 }
160 ]
161 },
162 "1.3.1": {
163 "name": "once",
164 "version": "1.3.1",
165 "description": "Run a function exactly one time",
166 "main": "once.js",
167 "directories": {
168 "test": "test"
169 },
170 "dependencies": {
171 "wrappy": "1"
172 },
173 "devDependencies": {
174 "tap": "~0.3.0"
175 },
176 "scripts": {
177 "test": "tap test/*.js"
178 },
179 "repository": {
180 "type": "git",
181 "url": "git://github.com/isaacs/once"
182 },
183 "keywords": [
184 "once",
185 "function",
186 "one",
187 "single"
188 ],
189 "author": {
190 "name": "Isaac Z. Schlueter",
191 "email": "[email protected]",
192 "url": "http://blog.izs.me/"
193 },
194 "license": "BSD",
195 "gitHead": "c90ac02a74f433ce47f6938869e68dd6196ffc2c",
196 "bugs": {
197 "url": "https://github.com/isaacs/once/issues"
198 },
199 "homepage": "https://github.com/isaacs/once",
200 "_id": "[email protected]",
201 "_shasum": "f3f3e4da5b7d27b5c732969ee3e67e729457b31f",
202 "_from": ".",
203 "_npmVersion": "2.0.0",
204 "_nodeVersion": "0.10.31",
205 "_npmUser": {
206 "name": "isaacs",
207 "email": "[email protected]"
208 },
209 "maintainers": [
210 {
211 "name": "isaacs",
212 "email": "[email protected]"
213 }
214 ],
215 "dist": {
216 "shasum": "f3f3e4da5b7d27b5c732969ee3e67e729457b31f",
217 "tarball": "https://registry.npmjs.org/once/-/once-1.3.1.tgz"
218 }
219 },
220 "1.3.2": {
221 "name": "once",
222 "version": "1.3.2",
223 "description": "Run a function exactly one time",
224 "main": "once.js",
225 "directories": {
226 "test": "test"
227 },
228 "dependencies": {
229 "wrappy": "1"
230 },
231 "devDependencies": {
232 "tap": "~0.3.0"
233 },
234 "scripts": {
235 "test": "tap test/*.js"
236 },
237 "repository": {
238 "type": "git",
239 "url": "git://github.com/isaacs/once.git"
240 },
241 "keywords": [
242 "once",
243 "function",
244 "one",
245 "single"
246 ],
247 "author": {
248 "name": "Isaac Z. Schlueter",
249 "email": "[email protected]",
250 "url": "http://blog.izs.me/"
251 },
252 "license": "ISC",
253 "gitHead": "e35eed5a7867574e2bf2260a1ba23970958b22f2",
254 "bugs": {
255 "url": "https://github.com/isaacs/once/issues"
256 },
257 "homepage": "https://github.com/isaacs/once#readme",
258 "_id": "[email protected]",
259 "_shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b",
260 "_from": ".",
261 "_npmVersion": "2.9.1",
262 "_nodeVersion": "2.0.0",
263 "_npmUser": {
264 "name": "isaacs",
265 "email": "[email protected]"
266 },
267 "dist": {
268 "shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b",
269 "tarball": "https://registry.npmjs.org/once/-/once-1.3.2.tgz"
270 },
271 "maintainers": [
272 {
273 "name": "isaacs",
274 "email": "[email protected]"
275 }
276 ]
277 },
278 "1.3.3": {
279 "name": "once",
280 "version": "1.3.3",
281 "description": "Run a function exactly one time",
282 "main": "once.js",
283 "directories": {
284 "test": "test"
285 },
286 "dependencies": {
287 "wrappy": "1"
288 },
289 "devDependencies": {
290 "tap": "^1.2.0"
291 },
292 "scripts": {
293 "test": "tap test/*.js"
294 },
295 "files": [
296 "once.js"
297 ],
298 "repository": {
299 "type": "git",
300 "url": "git://github.com/isaacs/once.git"
301 },
302 "keywords": [
303 "once",
304 "function",
305 "one",
306 "single"
307 ],
308 "author": {
309 "name": "Isaac Z. Schlueter",
310 "email": "[email protected]",
311 "url": "http://blog.izs.me/"
312 },
313 "license": "ISC",
314 "gitHead": "2ad558657e17fafd24803217ba854762842e4178",
315 "bugs": {
316 "url": "https://github.com/isaacs/once/issues"
317 },
318 "homepage": "https://github.com/isaacs/once#readme",
319 "_id": "[email protected]",
320 "_shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20",
321 "_from": ".",
322 "_npmVersion": "3.3.2",
323 "_nodeVersion": "4.0.0",
324 "_npmUser": {
325 "name": "isaacs",
326 "email": "[email protected]"
327 },
328 "dist": {
329 "shasum": "b2e261557ce4c314ec8304f3fa82663e4297ca20",
330 "tarball": "https://registry.npmjs.org/once/-/once-1.3.3.tgz"
331 },
332 "maintainers": [
333 {
334 "name": "isaacs",
335 "email": "[email protected]"
336 }
337 ]
338 },
339 "1.4.0": {
340 "name": "once",
341 "version": "1.4.0",
342 "description": "Run a function exactly one time",
343 "main": "once.js",
344 "directories": {
345 "test": "test"
346 },
347 "dependencies": {
348 "wrappy": "1"
349 },
350 "devDependencies": {
351 "tap": "^7.0.1"
352 },
353 "scripts": {
354 "test": "tap test/*.js"
355 },
356 "files": [
357 "once.js"
358 ],
359 "repository": {
360 "type": "git",
361 "url": "git://github.com/isaacs/once.git"
362 },
363 "keywords": [
364 "once",
365 "function",
366 "one",
367 "single"
368 ],
369 "author": {
370 "name": "Isaac Z. Schlueter",
371 "email": "[email protected]",
372 "url": "http://blog.izs.me/"
373 },
374 "license": "ISC",
375 "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6",
376 "bugs": {
377 "url": "https://github.com/isaacs/once/issues"
378 },
379 "homepage": "https://github.com/isaacs/once#readme",
380 "_id": "[email protected]",
381 "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
382 "_from": ".",
383 "_npmVersion": "3.10.7",
384 "_nodeVersion": "6.5.0",
385 "_npmUser": {
386 "name": "isaacs",
387 "email": "[email protected]"
388 },
389 "dist": {
390 "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
391 "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz"
392 },
393 "maintainers": [
394 {
395 "name": "isaacs",
396 "email": "[email protected]"
397 }
398 ],
399 "_npmOperationalInternal": {
400 "host": "packages-12-west.internal.npmjs.com",
401 "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661"
402 }
403 }
404 },
405 "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n\nTo check whether you function has been called, use `fn.called`. Once the\nfunction is called for the first time the return value of the original\nfunction is saved in `fn.value` and subsequent calls will continue to\nreturn this value.\n\n```javascript\nvar once = require('once')\n\nfunction load (cb) {\n cb = once(cb)\n var stream = createStream()\n stream.once('data', cb)\n stream.once('end', function () {\n if (!cb.called) cb(new Error('not found'))\n })\n}\n```\n\n## `once.strict(func)`\n\nThrow an error if the function is called twice.\n\nSome functions are expected to be called only once. Using `once` for them would\npotentially hide logical errors.\n\nIn the example below, the `greet` function has to call the callback only once:\n\n```javascript\nfunction greet (name, cb) {\n // return is missing from the if statement\n // when no name is passed, the callback is called twice\n if (!name) cb('Hello anonymous')\n cb('Hello ' + name)\n}\n\nfunction log (msg) {\n console.log(msg)\n}\n\n// this will print 'Hello anonymous' but the logical error will be missed\ngreet(null, once(msg))\n\n// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time\ngreet(null, once.strict(msg))\n```\n",
406 "maintainers": [
407 {
408 "name": "isaacs",
409 "email": "[email protected]"
410 }
411 ],
412 "time": {
413 "modified": "2018-03-11T12:37:07.947Z",
414 "created": "2012-08-14T07:25:56.929Z",
415 "1.1.1": "2012-08-14T07:25:58.262Z",
416 "1.2.0": "2013-08-12T02:55:21.962Z",
417 "1.3.0": "2013-10-24T06:27:26.638Z",
418 "1.3.1": "2014-09-18T23:05:04.887Z",
419 "1.3.2": "2015-05-04T23:09:54.026Z",
420 "1.3.3": "2015-11-20T21:45:14.765Z",
421 "1.4.0": "2016-09-06T21:11:09.367Z"
422 },
423 "author": {
424 "name": "Isaac Z. Schlueter",
425 "email": "[email protected]",
426 "url": "http://blog.izs.me/"
427 },
428 "repository": {
429 "type": "git",
430 "url": "git://github.com/isaacs/once.git"
431 },
432 "users": {
433 "stdarg": true,
434 "yi": true,
435 "abg": true,
436 "chengen": true,
437 "novaleaf": true,
438 "jamescostian": true,
439 "amirmehmood": true,
440 "schnittstabil": true,
441 "donnicky": true,
442 "oleaasen": true,
443 "ergunozyurt": true,
444 "gochomugo": true,
445 "adamlu": true,
446 "saru95": true,
447 "kingtrocki": true,
448 "fill": true,
449 "sjnnr": true,
450 "isik": true,
451 "karthickt": true,
452 "barenko": true,
453 "vwal": true,
454 "milfromoz": true,
455 "quocnguyen": true,
456 "coalesce": true,
457 "loselovegirl": true,
458 "shan": true,
459 "mattmcfarland": true,
460 "codebyren": true,
461 "mojaray2k": true,
462 "dzhou777": true,
463 "garenyondem": true,
464 "jpwilliams": true,
465 "ash": true,
466 "arefm": true,
467 "seangenabe": true,
468 "nichoth": true,
469 "edwingeng": true,
470 "rocket0191": true,
471 "detj": true,
472 "morogasper": true,
473 "knksmith57": true
474 },
475 "homepage": "https://github.com/isaacs/once#readme",
476 "keywords": [
477 "once",
478 "function",
479 "one",
480 "single"
481 ],
482 "bugs": {
483 "url": "https://github.com/isaacs/once/issues"
484 },
485 "license": "ISC",
486 "readmeFilename": "README.md",
487 "_attachments": {}
488 }