{"name":"pend","version":"1.1.1","description":"dead-simple optimistic async helper","main":"index.js","scripts":{"test":"node test.js"},"author":{"name":"Andrew Kelley","email":"superjoe30@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git://github.com/superjoe30/node-pend.git"},"bugs":{"url":"https://github.com/superjoe30/node-pend/issues"},"_id":"pend@1.1.1","dist":{"shasum":"fabca8f067ff204012fa7645759ef9c158fbc907","tarball":"http://registry-npm.ywwl.com/pend/download/pend-1.1.1.tgz","integrity":"sha512-2wgSKau7KGHo8r5VBGafjc3xX6NVUluPel9GsBFJvismeT1kvmFs6qaUTIhNQ+VMpDBh8jHOigYqlxiP3z6Svw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs/jdPm3SXv38cpZKOMzJIpca3uAquvqr9e5pk1L5aGAIgYIur+4asaplHsKwltOu5leQ2yOBia5vyNH688RWHHFY="}],"size":1302,"noattachment":false,"key":"/pend/-/pend-1.1.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"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","publish_time":1380007953755,"_cnpm_publish_time":1380007953755,"dist-tags":{"latest":"1.2.0"}}