{"name":"qmap","version":"0.2.0","description":"Async function map and queue","main":"index.js","scripts":{"test":"mocha ./test"},"repository":{"type":"git","url":"https://github.com/scottcorgan/qmap.git"},"keywords":["async","queue","map","function"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/qmap/issues"},"homepage":"https://github.com/scottcorgan/qmap","dependencies":{"drainer":"0.2.x","flatten":"0.0.x"},"devDependencies":{"mocha":"1.17.x","expect.js":"0.3.x"},"_id":"qmap@0.2.0","dist":{"shasum":"e4b43ae95a10ab7f645b7b609e718413d4768f2d","tarball":"http://registry-npm.ywwl.com/qmap/download/qmap-0.2.0.tgz","integrity":"sha512-G5abpnpCBNc1avWMzejsZBCIJr/LfgNFCOCgScFICQOqewSSNVmtDWT+KFPOwMN0UQ0t8DC+Mzpy1kI+/Hv6gQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIAZiNiAeLFkyFYWCw0NV7Zqfyl8ihTEvtRYvvg/WcSQIhAI3qWH6BrlnAeEMoQCd669HKJRv9iJxQqECCid7PlAtq"}],"size":2278,"noattachment":false,"key":"/qmap/-/qmap-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"readme":"# qmap\n\nAsync function map and queue.\n\nCreate methods and add those methods to a queue to be drained later.\n\n## Install\n\n```\nnpm install qmap --save\n```\n\n## Usage\n\nAdding anonymous functions\n\n```js\nvar Qmap = requier('qmap');\nvar queue = new Qmap();\n// You may pass in an optional context as the first argument to bind each method to\n// when instantiating the constructor\n\nqueue.push(function (done) {\n  // Do something\n  done();\n});\n\nqueue.push(function (done) {\n  // Do something else\n  done();\n});\n\nqueue.drain(function (err) {\n  // All done\n});\n```\n\nAdding named methods and anonymous functions\n\n```js\nvar Qmap = require('qmap');\nvar queue = new Qmap();\n\nqueue.method('method1', function (done) {\n  // Do something\n  done();\n});\n\nqueue.push('method1');\nqueue.push(function (done) {\n  done();\n});\n\nqueue.drain(function (err) {\n  \n});\n```\n\n## Api\n\n### push(fn[, fn1, fn2, ....]);\n\nAdd any number of functions, either as arguments or as an array. These can be either anonymous functions or named methods declared by the `method()` function.\n\n* `fn` - function or name of a method on the queue\n\n### method(name, fn)\n\nCreate a named method to be used later in the queue with `push(methodName)`\n\n* `name` - the name of the method\n* `fn` - the function to fun when the named method gets added to the queue\n\n## Run tests\n\n```\nnpm install\nnpm test\n```","publish_time":1394075420503,"_cnpm_publish_time":1394075420503,"dist-tags":{"latest":"0.2.3"}}