package.json
2.9 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
"_args": [
[
{
"raw": "pend@~1.2.0",
"scope": null,
"escapedName": "pend",
"name": "pend",
"rawSpec": "~1.2.0",
"spec": ">=1.2.0 <1.3.0",
"type": "range"
},
"/Users/fzy/project/koa2_Sequelize_project/node_modules/fd-slicer"
]
],
"_from": "pend@>=1.2.0 <1.3.0",
"_id": "pend@1.2.0",
"_inCache": true,
"_location": "/pend",
"_npmUser": {
"name": "superjoe",
"email": "superjoe30@gmail.com"
},
"_npmVersion": "1.4.21",
"_phantomChildren": {},
"_requested": {
"raw": "pend@~1.2.0",
"scope": null,
"escapedName": "pend",
"name": "pend",
"rawSpec": "~1.2.0",
"spec": ">=1.2.0 <1.3.0",
"type": "range"
},
"_requiredBy": [
"/fd-slicer"
],
"_resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"_shasum": "7a57eb550a6783f9115331fcf4663d5c8e007a50",
"_shrinkwrap": null,
"_spec": "pend@~1.2.0",
"_where": "/Users/fzy/project/koa2_Sequelize_project/node_modules/fd-slicer",
"author": {
"name": "Andrew Kelley",
"email": "superjoe30@gmail.com"
},
"bugs": {
"url": "https://github.com/andrewrk/node-pend/issues"
},
"dependencies": {},
"description": "dead-simple optimistic async helper",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "7a57eb550a6783f9115331fcf4663d5c8e007a50",
"tarball": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz"
},
"gitHead": "ed57bbe8520518dca24d0c6bb847ffb6b68ae6f9",
"homepage": "https://github.com/andrewrk/node-pend#readme",
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "superjoe",
"email": "superjoe30@gmail.com"
}
],
"name": "pend",
"optionalDependencies": {},
"readme": "# Pend\n\nDead-simple optimistic async helper.\n\n## Usage\n\n```js\nvar Pend = require('pend');\nvar pend = new Pend();\npend.max = 10; // defaults to Infinity\nsetTimeout(pend.hold(), 1000); // pend.wait will have to wait for this hold to finish\npend.go(function(cb) {\n console.log(\"this function is immediately executed\");\n setTimeout(function() {\n console.log(\"calling cb 1\");\n cb();\n }, 500);\n});\npend.go(function(cb) {\n console.log(\"this function is also immediately executed\");\n setTimeout(function() {\n console.log(\"calling cb 2\");\n cb();\n }, 1000);\n});\npend.wait(function(err) {\n console.log(\"this is excuted when the first 2 have returned.\");\n console.log(\"err is a possible error in the standard callback style.\");\n});\n```\n\nOutput:\n\n```\nthis function is immediately executed\nthis function is also immediately executed\ncalling cb 1\ncalling cb 2\nthis is excuted when the first 2 have returned.\nerr is a possible error in the standard callback style.\n```\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/andrewrk/node-pend.git"
},
"scripts": {
"test": "node test.js"
},
"version": "1.2.0"
}