{"name":"qmap","version":"0.2.3","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","lodash.isarguments":"2.4.x","flat-arguments":"0.3.x","as-array":"0.1.x"},"devDependencies":{"mocha":"1.17.x","expect.js":"0.3.x"},"_id":"qmap@0.2.3","dist":{"shasum":"b7844e8d4a832483a8207805c059e0bb8b2fff9c","tarball":"http://registry-npm.ywwl.com/qmap/download/qmap-0.2.3.tgz","integrity":"sha512-Cu1kG1To/wj17rvjQmg2DdPICfIGA8+JY/Wkv+L6QHsoRnWWCsk7Ty3j/cy1sSS9Rq7HJOPWiCGhAWx2DkVMow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+UXedEwt61gOhrfZURJreCqKkLlDn514DSxSXv+j8ngIgKwli4b1BQh1vt3G56IwCl5dq86Yv0mxxLtWKZpZF9Sk="}],"size":2295,"noattachment":false,"key":"/qmap/-/qmap-0.2.3.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":1394487964847,"_cnpm_publish_time":1394487964847,"dist-tags":{"latest":"0.2.3"}}