{"name":"pend","version":"1.1.3","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.3","dist":{"shasum":"ca68dd39e6dd7f8d3f8801dcdbcb44846c431845","tarball":"http://registry-npm.ywwl.com/pend/download/pend-1.1.3.tgz","integrity":"sha512-oQiRXTFeL4KY2IAVuBsaokdEw4+WpKUu8qr/bFyKEpaqpcaflo3M/v5AORXbKxd1liRNtoOEfAV5FRjzrr1jJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCt4qIMqEt0MXyPMD9RBBmlLkyr2E1pwfevgFTrGksiFwIgEe3SzSRiYlPG8mpcF5DKllAbTZ9cvSUZDE8qNGp6DA0="}],"size":2212,"noattachment":false,"key":"/pend/-/pend-1.1.3.tgz"},"_from":".","_npmVersion":"1.3.10","_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":1408577686349,"_cnpm_publish_time":1408577686349,"dist-tags":{"latest":"1.2.0"}}