{"name":"qmap","version":"0.2.1","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","lodash.isarguments":"2.4.x"},"devDependencies":{"mocha":"1.17.x","expect.js":"0.3.x"},"_id":"qmap@0.2.1","dist":{"shasum":"2e13ca6b10d78522ff44dcfe09c51929f0f9db7e","tarball":"http://registry-npm.ywwl.com/qmap/download/qmap-0.2.1.tgz","integrity":"sha512-1HyCeBfjU37O/LJRfx+a8asz1LMg/1Hcp0vVV8CRGCSZJNdUxpT7eswEPi4mfkYIV1tCXVvSSIwo2Qg1urLpIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+RSfQLskn9Nq7iWKoBLfEgAnNQuioRjcRDmKho6wtwwIhAJ3qz69N5STiDGEZGoAsRlBG2edrGp70aPu83UBnCtYK"}],"size":2305,"noattachment":false,"key":"/qmap/-/qmap-0.2.1.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":1394135629784,"_cnpm_publish_time":1394135629784,"dist-tags":{"latest":"0.2.3"}}