{"maintainers":[{"name":"ottomao","email":"ottomao@gmail.com"}],"keywords":["async","task","manager"],"dist-tags":{"latest":"1.1.0"},"author":{"name":"Otto Mao","email":"ottomao@gmail.com","url":"http://ottomao.com/"},"description":"A simple nodeJS module for async task manager. Identical tasks will be executed only once and the result will be saved for further use.","readme":"async-task-mgr\n==============\n\n## Intro\nA simple nodeJS module for async task manager. Identical tasks will be executed only once and the result will be saved for further use.\n\n## Features\n\n* tasks with the same name are identified as **the same**, and will be executed only once\n* task result will be saved for further use\n\n\n## How to use\n\n``npm install async-task-mgr --save``\n\n## Sample\n```javascript\nvar asyncTask = require(\"async-task-mgr\");\n\nvar asyncTaskInstance = new asyncTask();\n\nfunction taskAction(callback){\n\tsetTimeout(function(){ //simulate an async task\n\t\tvar resultA = Math.floor(Math.random()*100),\n\t\t\tresultB = Math.floor(Math.random()*100),\n\t\t\tresultC = Math.floor(Math.random()*100);\n\n\t\tcallback(resultA, resultB, resultC);\n\t},2000); \n}\n\n//add a new task named task_A\n//when taskAction is done, its return value will be saved and apply to all the task with the same name\nasyncTaskInstance.addTask(\"task_A\",taskAction,function(resultA,resultB,resultC){ \n\tconsole.log(\"task A_1 result :\" + resultA + \" \" + resultB + \" \" + resultC); //all result generated by taskAction will be passed here\n});\n\n\n//add a new task named task_A\n/*\nsince a task with the same name has been added, this taskAction will not be executed.\nthe callback function will be put in a queue and will be called when previous callbacks are done.\n*/\nasyncTaskInstance.addTask(\"task_A\",taskAction,function(resultA,resultB,resultC){\n\tconsole.log(\"task A_2 result :\" + resultA + \" \" + resultB + \" \" + resultC);\n});\n\n\n//add a new task named task_X\n//a new task, have no relationship to the previous ones\nasyncTaskInstance.addTask(\"task_X\",taskAction,function(resultA,resultB,resultC){\n\tconsole.log(\"task X_0 result :\" + resultA + \" \" + resultB + \" \" + resultC);\n});\n\n```\n\n## Author\nOtto Mao \nottomao@gmail.com","repository":{"type":"git","url":"https://github.com/ottomao/async-task-mgr.git"},"bugs":{"url":"https://github.com/ottomao/async-task-mgr/issues"},"license":"ISC","versions":{"1.0.0":{"name":"async-task-mgr","version":"1.0.0","description":"A simple nodeJS module for async task manager. Identical tasks will be executed only once and the result will be saved for further use.","main":"index.js","scripts":{"test":"test.js"},"repository":{"type":"git","url":"https://github.com/ottomao/async-task-mgr.git"},"keywords":["async","task","manager"],"author":{"name":"Otto Mao","email":"ottomao@gmail.com","url":"http://ottomao.com/"},"license":"ISC","bugs":{"url":"https://github.com/ottomao/async-task-mgr/issues"},"homepage":"https://github.com/ottomao/async-task-mgr","gitHead":"06be61707aea29111c75d7e9f9e2c5257c4b0968","_id":"async-task-mgr@1.0.0","_shasum":"ac1f7d6947c682c26713304d46e641783f6b17c8","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"ottomao","email":"ottomao@gmail.com"},"maintainers":[{"name":"ottomao","email":"ottomao@gmail.com"}],"dist":{"shasum":"ac1f7d6947c682c26713304d46e641783f6b17c8","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/async-task-mgr/-/async-task-mgr-1.0.0.tgz"},"directories":{}},"1.0.1":{"name":"async-task-mgr","version":"1.0.1","description":"A simple nodeJS module for async task manager. Identical tasks will be executed only once and the result will be saved for further use.","main":"index.js","scripts":{"test":"test.js"},"repository":{"type":"git","url":"https://github.com/ottomao/async-task-mgr.git"},"keywords":["async","task","manager"],"author":{"name":"Otto Mao","email":"ottomao@gmail.com","url":"http://ottomao.com/"},"license":"ISC","bugs":{"url":"https://github.com/ottomao/async-task-mgr/issues"},"homepage":"https://github.com/ottomao/async-task-mgr","gitHead":"c6b125929ddfb3f5804b1dc4de17cba6b552e698","_id":"async-task-mgr@1.0.1","_shasum":"5a61487258fe2293ebf021fc65b1a68bdaa9adf9","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"ottomao","email":"ottomao@gmail.com"},"maintainers":[{"name":"ottomao","email":"ottomao@gmail.com"}],"dist":{"shasum":"5a61487258fe2293ebf021fc65b1a68bdaa9adf9","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/async-task-mgr/-/async-task-mgr-1.0.1.tgz"},"directories":{}},"1.0.2":{"name":"async-task-mgr","version":"1.0.2","description":"A simple nodeJS module for async task manager. Identical tasks will be executed only once and the result will be saved for further use.","main":"index.js","scripts":{"test":"test.js"},"repository":{"type":"git","url":"https://github.com/ottomao/async-task-mgr.git"},"keywords":["async","task","manager"],"author":{"name":"Otto Mao","email":"ottomao@gmail.com","url":"http://ottomao.com/"},"license":"ISC","bugs":{"url":"https://github.com/ottomao/async-task-mgr/issues"},"homepage":"https://github.com/ottomao/async-task-mgr","gitHead":"cd239d02b056c77795791490b2a46842d30f6784","_id":"async-task-mgr@1.0.2","_shasum":"2dead4814644632e399c6d8ab6736df4c0b06f11","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"ottomao","email":"ottomao@gmail.com"},"maintainers":[{"name":"ottomao","email":"ottomao@gmail.com"}],"dist":{"shasum":"2dead4814644632e399c6d8ab6736df4c0b06f11","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/async-task-mgr/-/async-task-mgr-1.0.2.tgz"},"directories":{}},"1.1.0":{"name":"async-task-mgr","version":"1.1.0","description":"A simple nodeJS module for async task manager. Identical tasks will be executed only once and the result will be saved for further use.","main":"index.js","scripts":{"test":"test.js"},"repository":{"type":"git","url":"https://github.com/ottomao/async-task-mgr.git"},"keywords":["async","task","manager"],"author":{"name":"Otto Mao","email":"ottomao@gmail.com","url":"http://ottomao.com/"},"license":"ISC","bugs":{"url":"https://github.com/ottomao/async-task-mgr/issues"},"homepage":"https://github.com/ottomao/async-task-mgr","gitHead":"9bf4bb670113035886952923f7a79b188852498f","_id":"async-task-mgr@1.1.0","_shasum":"a82d11aef631ae567b5d76b1e83a999a4a34aaf6","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"ottomao","email":"ottomao@gmail.com"},"maintainers":[{"name":"ottomao","email":"ottomao@gmail.com"}],"dist":{"shasum":"a82d11aef631ae567b5d76b1e83a999a4a34aaf6","tarball":"http://nexus.dui88.com:8081/nexus/content/repositories/npm-registry/async-task-mgr/-/async-task-mgr-1.1.0.tgz"},"directories":{}}},"name":"async-task-mgr","time":{"modified":"2014-11-28T07:34:11.488Z","created":"2014-08-13T07:23:00.876Z","1.0.0":"2014-08-13T07:23:00.876Z","1.0.1":"2014-08-13T07:31:12.963Z","1.0.2":"2014-08-14T00:55:53.925Z","1.1.0":"2014-11-28T07:34:11.488Z"},"readmeFilename":"README.md","homepage":"https://github.com/ottomao/async-task-mgr"}