-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
65 lines (65 loc) · 2.47 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
60
61
62
63
64
65
{
"_args": [
[
"inflight@1.0.6",
"/Users/eshanker/Code/fsevents"
]
],
"_from": "inflight@1.0.6",
"_id": "inflight@1.0.6",
"_inBundle": false,
"_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"_location": "/fsevents/inflight",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "inflight@1.0.6",
"name": "inflight",
"escapedName": "inflight",
"rawSpec": "1.0.6",
"saveSpec": null,
"fetchSpec": "1.0.6"
},
"_requiredBy": [
"/fsevents/glob"
],
"_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"_shrinkwrap": null,
"_spec": "1.0.6",
"_where": "/Users/eshanker/Code/fsevents",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/isaacs/inflight/issues"
},
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
},
"description": "Add callbacks to requests in flight to avoid async duplication",
"devDependencies": {
"tap": "^7.1.2"
},
"files": [
"inflight.js"
],
"homepage": "https://github.com/isaacs/inflight",
"license": "ISC",
"main": "inflight.js",
"name": "inflight",
"optionalDependencies": {},
"readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/inflight.git"
},
"scripts": {
"test": "tap test.js --100"
},
"version": "1.0.6"
}