{"name":"pend","version":"1.1.2","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"},"gitHead":"453dd499161e68b0ff84bff75890179880ad0350","homepage":"https://github.com/superjoe30/node-pend","_id":"pend@1.1.2","_shasum":"b3760218c85b93ca893f4088005d3ff80253252b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"dist":{"shasum":"b3760218c85b93ca893f4088005d3ff80253252b","tarball":"http://registry-npm.ywwl.com/pend/download/pend-1.1.2.tgz","integrity":"sha512-+Iy6LasvOrK46O9EzqgxQ2tBRk9YOfPjGrDt2aercqBwCpvpMsQoQnj8v6+WEW+bGQEt/UIKDmVoFl4yoaktzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAw06ss+ECu75087syHWQMbQdimjBWvT4YRlTxdji9PpAiBm3+wrjqvqPGVInGIZxSNbcdWlBoLrIen78KDwzqgDTg=="}],"size":1979,"noattachment":false,"key":"/pend/-/pend-1.1.2.tgz"},"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":1404546097829,"_cnpm_publish_time":1404546097829,"dist-tags":{"latest":"1.2.0"}}