{"name":"than","version":"0.0.4","description":"Make everything asynchronous !","main":"script.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["async","than","callback"],"author":{"name":"Khalid REHIOUI","email":"Array.prototype@gmail.com","url":"http://github.com/Javascipt"},"license":"MIT","_id":"than@0.0.4","_shasum":"00e3e1326a6528a74d6857a233630efa98577a8c","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"javascript","email":"Array.prototype@gmail.com"},"maintainers":[{"name":"javascript","email":"Array.prototype@gmail.com"}],"dist":{"shasum":"00e3e1326a6528a74d6857a233630efa98577a8c","tarball":"http://registry-npm.ywwl.com/than/download/than-0.0.4.tgz","integrity":"sha512-pXKFk8LrAQI0O7pTxxi5hh+KecL68bF96Ysqe+fB0Bq0NmxU09KXR1/bcshlv6ICfUxOlvYP6W1RC4grYH6TmQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB90XYVnG2XiEZr3+vJhDOyb222w8WpJz7jxpPMuPCj+AiBJwDTgfZx0xwpH4Q3f35Vn4WjXwR5w2tYUBM1WFZmH4A=="}],"size":4332,"noattachment":false,"key":"/than/-/than-0.0.4.tgz"},"readme":"# Than\r\n\r\nMake your functions asynchronous by using the `than` function !!!\r\n\r\n## Installation\r\n\r\nUse the npm command\r\n\r\n    npm install than\r\n\r\n## Usage\r\n\r\nThis package adds a prototype to `Function`, to use it, you need first to require it :\r\n\r\n    require('than');\r\n\r\n## Example\r\n\r\nHere is an example showing you how this `than` function can be used\r\n\r\nLet's say you have a function with blocking code\r\n\r\n    function calculate(a, b) {\r\n        /*\r\n            Your code that might take too long to execute !\r\n         */\r\n\r\n        return a + b;\r\n    }\r\n\r\nSo, instead of calling the function directly by passing two arguments, you can pass these arguments to the `than` function and a callBack that receives the result of the main function.\r\n\r\n    console.log(\"Do something\");\r\n\r\n    calculate.than(1, 2, function(result) {\r\n        console.log(\"Then display the result : \", result);\r\n    });\r\n\r\n    console.log(\"Do other thing\");\r\n\r\nIf the `calculate` function takes too long to finish its execution, the output of the code above would be :\r\n\r\n    Do something\r\n    Do other thing\r\n    Then display the result : 3","publish_time":1419196978604,"_cnpm_publish_time":1419196978604,"dist-tags":{"latest":"0.0.8"}}