{"_id":"zero-respond","_rev":"26-46611fc5e4e6253450b2172f0c255105","name":"zero-respond","description":"This module handles respond of request when you use bus in your request handler.","dist-tags":{"latest":"0.0.13"},"versions":{"0.0.1":{"name":"zero-respond","version":"0.0.1","description":"zero module","zero":{"dependencies":{"request":"zero-request^0.0.1","model":"zero-model^0.0.1","bus":"zero-bus^0.0.1"}},"author":{"name":"jiamiu"},"gitHead":"31f4c6d1a5b8ef66d159fbcbbe0f2fc29e54f44c","_id":"zero-respond@0.0.1","scripts":{},"_shasum":"79eb849f888a8bfd69dfce5cdf3376e47f8ad39e","_from":"/Users/jiamiu/Documents/work/personal/moon/modules/zero-respond","_npmVersion":"1.4.23","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"79eb849f888a8bfd69dfce5cdf3376e47f8ad39e","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.1.tgz","integrity":"sha512-oQ/H8IqmeN3RJG5jS+KKwKt/goGe6/4wfk6yZGOrNp3lo9Np6Xu5ZERiHCqxMwDSOYS6MOWLG1cqgDWlvqQvYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDDrp3teENHRKIJIgSPL7Qx/OMeFRw4CeBNU336FfkcCAiAxrEZCGhnqOJ1/yLYhpvXWzVumoowaR9gV5o/RlV7ILA=="}]}},"0.0.3":{"name":"zero-respond","version":"0.0.3","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"4de3a0354ec8482fe49acf8be9aa68a95bf35e9a","_id":"zero-respond@0.0.3","scripts":{},"_shasum":"5c8213a872dcc64313f33955247c129e7373039e","_from":"/Users/jiamiu/Documents/work/personal/moon/modules/respond","_npmVersion":"1.4.23","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"5c8213a872dcc64313f33955247c129e7373039e","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.3.tgz","integrity":"sha512-sqOf5SRI5IZK2P7rvNfZFrFkczQ/+SMgETBc/DrVgrbvyVckpNmZa/wTI6cRaTln4rwKPoSgFtTNRJcaUu/itg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg94EbcLBbymxbtdbSNRB9W/Rddmf4JVX280TNeBW3hQIhAO8bv1WMCr3M3nlMJsqzC+aifeKrXHebB3INhjH9Ir3m"}]}},"0.0.4":{"name":"zero-respond","version":"0.0.4","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"4de3a0354ec8482fe49acf8be9aa68a95bf35e9a","_id":"zero-respond@0.0.4","scripts":{},"_shasum":"57edde7771c6c867a3ddde9e60e361fcaf83976c","_from":"/Users/jiamiu/Documents/work/personal/moon/modules/respond","_npmVersion":"1.4.23","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"57edde7771c6c867a3ddde9e60e361fcaf83976c","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.4.tgz","integrity":"sha512-8FhtdEESygF6jt44Yy5ASqhKvcfCC6sFd6Wqr/e3e4BgfFW2OF5ozASgnVwFvJYS4SE6G4D4t6YNylgqWSQOEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDzwUbaJNSrQ7zbzXcNtqOmxqk6D7dsdoO4ogXxfgtmgIgQNDs4DLVBXl0XHde/RmEJoglLG0ndb95YuFu8xMz2kU="}]}},"0.0.5":{"name":"zero-respond","version":"0.0.5","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"41d99ba5cb3ef1e93eb2512b0368f2bec407465c","_id":"zero-respond@0.0.5","scripts":{},"_shasum":"d358cbe76fd19fd401b58bf73695abade6dd9efd","_from":"/Users/jiamiu/Documents/work/personal/moon/modules/respond","_npmVersion":"1.4.23","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"d358cbe76fd19fd401b58bf73695abade6dd9efd","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.5.tgz","integrity":"sha512-UrKp95TJVw5zn0qbvtB9aYc5pPLniaTc0Ke6fqeDTgB5yOBw0PgVlzIhn4w0BCfBVDOOmot1V34gpa8hDTP/TA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGY8yFJBa0k07oPZseNzHNT1Dh8VxBkjauGQtDR8TRIUAiBGg+X1dMLwpArBWFIkd7cqMXr9X9Fm7oGUroXXa6sKDw=="}]}},"0.0.6":{"name":"zero-respond","version":"0.0.6","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"874423e2448975b1e5bce158b875b9d46edcba62","_id":"zero-respond@0.0.6","scripts":{},"_shasum":"74eb047d6cafb25c38371b8f3cbf86130992226d","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"74eb047d6cafb25c38371b8f3cbf86130992226d","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.6.tgz","integrity":"sha512-e6HBjFbVwRllB9M0vqG67rGjrwRipfwIz5yCVKxrIqfVEqTlQ705dyJb8h16P0f//TL7fSu735+SelWkMRuI5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2aBrnVUJGQTyoXI8I8zrcbTq71CDJIN81eBlNaPr7ywIgTk9+dGDZr7+Bp9gVN0EQpNIRUfV39Amn7LIMlpSxjD8="}]}},"0.0.7":{"name":"zero-respond","version":"0.0.7","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"0b3db4d19d16c45090e23ef4814d734fd4ca5ca5","_id":"zero-respond@0.0.7","scripts":{},"_shasum":"33ffac1f88116a5ef443721bba08222021ae2956","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"33ffac1f88116a5ef443721bba08222021ae2956","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.7.tgz","integrity":"sha512-nzu6GWiqhfXnKBKixThO9JFhS34Kjc+IIb//C0+FShVQfQjDH7zRGk9CkxLF2Ln50Yxa7zllJXzIdtPkjINbtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIJOxNmXhDALQbFVTJFpUCS+thC2q25SWReWe+G9Y5+QIgdTfFPNlQhznalxCUquaQN/6HZ8YLQ6BNprDhC7ECeMs="}]}},"0.0.8":{"name":"zero-respond","version":"0.0.8","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1","logger":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"1de73f3463ebe6939fe87d7dbcb370eaddc25b8f","_id":"zero-respond@0.0.8","scripts":{},"_shasum":"39ce2724fc5bbcd86e7fd820585df8f71d8183ba","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"39ce2724fc5bbcd86e7fd820585df8f71d8183ba","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.8.tgz","integrity":"sha512-P82ueelFkn9oO34eWt1Z/G0H0YpZnqumRUtFv/D76Dgz7FA6RqDAghWUNUvYwtCR5/WE2ISs4QzXQ9CnMvefNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCm91snizCtEtGmRic9U9cARqpb4hpp+RkbcH8txbz66wIgRhPxDXDODc51JAX7ZvVHYCVzZ94AGF1pm/RlAjo6joA="}]}},"0.0.9":{"name":"zero-respond","version":"0.0.9","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1","logger":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"3c36de3f3aebfa4f59c76348c341d0482a9a9ca5","_id":"zero-respond@0.0.9","scripts":{},"_shasum":"8e68a4ba212b7840858b9722ecbcfcc30971ab87","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"8e68a4ba212b7840858b9722ecbcfcc30971ab87","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.9.tgz","integrity":"sha512-KXLLO3lkrcxRCpU/mdsH/J/MrWfyFT8b7hsLJ2yOWyzPkEhYxuvVdJ9Czn5JloRiKnUpPcp9W6r9u1b2aUIpNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDk8Y+mJeX9BtEg4ekOwU31m5ZGRMpyc0uZBjfWgc6pYwIhAMa77GF2ty7Zqruvf21C/NYN5uPeSNzjp9QNtEcEAzSl"}]}},"0.0.10":{"name":"zero-respond","version":"0.0.10","description":"zero module","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1","logger":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"577f4bafbbc56f9444155e8c5916de9fa1a0f00e","_id":"zero-respond@0.0.10","scripts":{},"_shasum":"f54bd46edb2f2824cf9aae6df40352b7cf2c3945","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"f54bd46edb2f2824cf9aae6df40352b7cf2c3945","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.10.tgz","integrity":"sha512-XiCffW+azcwfRQlGJ20UTWSPa9uWztQoNHknE+u419GeqhQjA6UoyYIVPP8Ffopq+HPrtsg9tHYBYd1IaS1iww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD79mecvSQSm3e9r/FOCKKQbOkSp3DqHfISLC7KlclytQIgLabFFZOF+1lmea7iDrNFWvYU2u4wjyuMuk6Bnw/QlUU="}]}},"0.0.11":{"name":"zero-respond","version":"0.0.11","keywords":["zero module"],"description":"This module handles respond of request when you use bus in your request handler.","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1","logger":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"b604264e9196760cd6157fc925c1de12af631c5f","_id":"zero-respond@0.0.11","scripts":{},"_shasum":"f4555cd4b89f4365a3d8cb9619bfdc1c392425a9","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"f4555cd4b89f4365a3d8cb9619bfdc1c392425a9","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.11.tgz","integrity":"sha512-bIWmF5w0GCl4sVlLi6fgr7+lqtBu26Ui/sQK9qfJyT9gO8xVRmHaPTjSp2PBQpaiLMKeJH3yWrLNEBFtp3XK2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEw9NimepEHJspIvdnYHFlO9sbtMta9LxpKzQ09o67Y3AiEA9P6oyHi+y7MkUoOADzAIuvpUeH/lfjlQscOMjceBqMY="}]}},"0.0.12":{"name":"zero-respond","version":"0.0.12","keywords":["zero module"],"description":"This module handles respond of request when you use bus in your request handler.","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1","logger":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"0bdaeff98f997886b90b303a49e3e39d76fe160d","_id":"zero-respond@0.0.12","scripts":{},"_shasum":"39715e6c41c3f8f91076881b8451f8142a2ece0e","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"39715e6c41c3f8f91076881b8451f8142a2ece0e","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.12.tgz","integrity":"sha512-d6NBUGV7+qkULgAHbB8tdhSxmHQ6ri+HPbkQG3K7jSy4rSfZYuG2joZVWy0oaNgip0CRkG69/7Y+g6lutl2WJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH3039WXW31o6XISG1hKvmpN7Cs+D3dW48J39mvISIw0CIGS5synMfCK0I+U/ODTbchp/OmJkvh96uXIGXKobIiUH"}]}},"0.0.13":{"name":"zero-respond","version":"0.0.13","keywords":["zero module"],"description":"This module handles respond of request when you use bus in your request handler.","zero":{"dependencies":{"request":"^0.0.1","model":"^0.0.1","bus":"^0.0.1","logger":"^0.0.1"},"name":"respond"},"author":{"name":"jiamiu"},"gitHead":"e38c0fa3a3a6dc89b1c0fc5dbd5e54c9067ef12f","_id":"zero-respond@0.0.13","scripts":{},"_shasum":"76bfe34f3867589811e3c1c345021c85c88a2fe3","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.31","_npmUser":{"name":"sskyy","email":"skyking_H@hotmail.com"},"maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"dist":{"shasum":"76bfe34f3867589811e3c1c345021c85c88a2fe3","tarball":"https://registry.npmjs.org/zero-respond/-/zero-respond-0.0.13.tgz","integrity":"sha512-5rTUKcZcA0z1dYcAhQOaO/914qHH+33QXfjIXedksB0QK6JhTTGFqlctkExJ6gpXa2AmB+wWTqTkxnPPlYaEyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4ZqMTm+37QXOh6R2ofEDWeywEnoZRNiPqjMdGua4mtwIhAPVDh8Ce4oWILTbLSNbumXoaOUD7rNfA+nYSFAMjVujn"}]}}},"readme":"# zero-respond #\n\nThis module handles responding of request when you are using `bus` in your request handler.\n\n## Usage ##\n\n1. Add dependency to your module package.json file like:\n\n```\n{\n\t\"name\" : \"YOUR_MODULE_NAME\",\n\t\"zero\" : {\n\t\t\"dependencies\" : {\n\t\t\t\"respond\" : \"^0.0.1\"\n\t\t}\n\t}\n}\n```\n\n2. Set bus data named `respond` in your request' bus.\nRespond module adds a router handler which will always be called at last of every request,\nand read from data of bus to decide what to respond. Codes for more detail :\n\n```\nmodule.exports = {\n    route : {\n        \"GET /anyRoute\" : function( req, res){\n            //bus.fcall() fires two event automatically, one before and one after your main business logic\n            //In this case, it fires `someEvent.before` and `someEvent.after`\n            req.bus.fcall(\"someEvent\", arg1, arg2, function(){\n                //deal what you want to do\n\n                //respond module handlers 3 type of output, `data`, `file` and `page`. Which to output depend on your bus data.\n\n                //1.Output data as json.\n                req.bus.data(\"respond.data\",{\"key\":\"value})\n\n                //2.Render page with data, and output html as result.\n                req.bus.data(\"respond.data\", DATA_FOR_PAGE_RENDERING)\n                req.bus.data(\"respond.page\", TEMPLATE_LOCATION)\n\n                //3. Send file to client\n                req.bus.data(\"respond.fire\", FILE_LOCATION)\n            })\n        }\n    }\n}\n```\n\nWe strongly suggest you to use respond module to handle respond for you rather then using `res` in you request handler,\nbecause in this way other modules can modify or inject data to output easily.\nPlus, all data modification can be traced and nicely shown by dev tool.\n","maintainers":[{"name":"sskyy","email":"skyking_H@hotmail.com"}],"time":{"modified":"2022-06-29T16:54:28.448Z","created":"2014-10-17T09:53:03.408Z","0.0.1":"2014-10-17T09:53:03.408Z","0.0.3":"2014-10-17T14:51:34.062Z","0.0.4":"2014-10-17T15:20:45.690Z","0.0.5":"2014-10-17T15:38:55.351Z","0.0.6":"2014-10-25T18:33:32.728Z","0.0.7":"2014-10-26T07:50:11.881Z","0.0.8":"2014-10-26T19:17:10.701Z","0.0.9":"2014-11-03T12:13:02.220Z","0.0.10":"2014-11-27T02:47:37.227Z","0.0.11":"2014-11-28T06:42:37.921Z","0.0.12":"2014-12-11T13:20:55.144Z","0.0.13":"2014-12-22T10:48:44.494Z"},"author":{"name":"jiamiu"},"readmeFilename":"README.md","keywords":["zero module"]}