{"_id":"express-messages","_rev":"17-0edd6b38e7a3d7b92114f240f58cfd50","name":"express-messages","description":"Express flash notification message rendering","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"express-messages","description":"Express flash notification message rendering","version":"0.0.1","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"keywords":["express"],"main":"index","engines":{"node":">= 0.2.0"},"_id":"express-messages@0.0.1","_engineSupported":true,"_npmVersion":"0.2.18","_nodeVersion":"v0.4.1","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"d0ab581632a96137d2d9fb28273cc8b091397a00","tarball":"https://registry.npmjs.org/express-messages/-/express-messages-0.0.1.tgz","integrity":"sha512-vXpZcSdytYlKALpVYZK6jetjmiQdNaCLnFPy48NvgbfPiLbOY6YVmXf0KF0IuDCGXtMr0l3Lhi/h8k07xKgftA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7hlyGgt+pKCLZaBX5mvYb6SOaf/E4Jnbk5YU2bwZpTgIhALKuP/x46Z0EWOz6L/bfp9R4eKxd2j5e06ZBAJNFlOsx"}]}},"0.0.2":{"name":"express-messages","description":"Express flash notification message rendering","version":"0.0.2","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"keywords":["express"],"main":"index","engines":{"node":">= 0.2.0"},"_id":"express-messages@0.0.2","_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.6","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"9f3116edb69b32f1806392d6fb5c21b0b1df8bcb","tarball":"https://registry.npmjs.org/express-messages/-/express-messages-0.0.2.tgz","integrity":"sha512-v/jaJ6uuuIsfGQ3uaSjr2CgLcNvKP2XuOmPX97sMkBXXVp8vr75Q0A6j5VkL8LXhO7d/rKXLPphSSlgVytmSoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIArptWldu1sG4euWGDZFchqjXSOiD5C9yXQ8lwLfO4ezAiA19g2xUSvg+UvdoKRpia8pnvNazE31kyq5YJX4t8QOGw=="}]}},"1.0.0":{"name":"express-messages","description":"Express flash notification message rendering","version":"1.0.0","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"keywords":["express"],"main":"index.js","devDependencies":{"connect-flash":"^0.1.1","ejs":"^2.3.1","express":"^4.13.0","express-session":"^1.11.3","supertest":"^1.0.1","tap-spec":"^4.0.2","tape":"^4.0.0"},"engines":{"node":">= 0.10.0"},"repository":{"type":"git","url":"git+https://github.com/expressjs/express-messages.git"},"scripts":{"test":"tape test/messages.js | node_modules/.bin/tap-spec"},"gitHead":"1d7df3d7db41cf0ac4a718d5eec17332ca433ffe","bugs":{"url":"https://github.com/expressjs/express-messages/issues"},"homepage":"https://github.com/expressjs/express-messages#readme","_id":"express-messages@1.0.0","_shasum":"dfa014cff77996decb13038c8f147d41dcdfdab3","_from":".","_npmVersion":"3.2.0","_nodeVersion":"0.12.7","_npmUser":{"name":"artcommacode","email":"ryan@graphicalhouse.com"},"dist":{"shasum":"dfa014cff77996decb13038c8f147d41dcdfdab3","tarball":"https://registry.npmjs.org/express-messages/-/express-messages-1.0.0.tgz","integrity":"sha512-oJ7/fWK5J0m0SAOvgVmtAxrJW4EmNI8QI9JaWFWbYJbHn18Uw5BiZu36nGn051KYdHtM36QzulWy6aAoBdd8/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICuilhCrQnPFg3KXAIWnU4c2rzbY42JC88pBD+1ubmevAiAn/dfs6Fr+ujAxnXfY1u9CBdXV+Hgi2ah2Wsutf3VUYg=="}]},"maintainers":[{"name":"artcommacode","email":"ryan@graphicalhouse.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}]},"1.0.1":{"name":"express-messages","description":"Express flash notification message rendering","version":"1.0.1","author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"keywords":["express"],"main":"index.js","devDependencies":{"connect-flash":"^0.1.1","ejs":"^2.3.1","express":"^4.13.0","express-session":"^1.11.3","supertest":"^1.0.1","tap-spec":"^4.0.2","tape":"^4.0.0"},"engines":{"node":">= 0.10.0"},"repository":{"type":"git","url":"git+https://github.com/expressjs/express-messages.git"},"scripts":{"test":"tape test/messages.js | node_modules/.bin/tap-spec"},"gitHead":"d1db1cbe95eb32917d5062796b99e9ea9f123ca8","bugs":{"url":"https://github.com/expressjs/express-messages/issues"},"homepage":"https://github.com/expressjs/express-messages#readme","_id":"express-messages@1.0.1","_shasum":"9981a85a5d2b118c79fc33f52b41834ffee9685a","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"artcommacode","email":"ryan@graphicalhouse.com"},"dist":{"shasum":"9981a85a5d2b118c79fc33f52b41834ffee9685a","tarball":"https://registry.npmjs.org/express-messages/-/express-messages-1.0.1.tgz","integrity":"sha512-twwOvH1K0W7pPO/bz/Lq85GULnnZPQSPX3eLr7VRJyhQW9a+2vj9QI28r/AQhMu6bnNZkpxB/QflsDQi3hI7lQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD32yhjAQY+6Ir2/ueyqtzlPbsG2AX0z9B8waaEGpJOWwIhAJ8kuqKHsJxL1tvufxHTOcVjCBm+bw36MLAR/QjsZTix"}]},"maintainers":[{"name":"artcommacode","email":"ryan@graphicalhouse.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/express-messages-1.0.1.tgz_1461573258084_0.4463885903824121"}}},"maintainers":[{"name":"artcommacode","email":"ryan@graphicalhouse.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"time":{"modified":"2022-06-17T22:25:36.528Z","created":"2011-02-21T19:17:42.573Z","0.0.1":"2011-02-21T19:17:42.954Z","0.0.2":"2011-04-25T15:39:10.064Z","1.0.0":"2015-09-18T09:45:07.149Z","1.0.1":"2016-04-25T08:34:20.033Z"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"keywords":["express"],"readme":"# Express Messages\n\nThe _express-messages_ module provides flash notification rendering.\n\n## Installation\n\n    $ npm install express-messages\n\n## Usage\n\n### Express 2.x\n\nTo use simply assign it to a dynamic helper:\n\n    app.dynamicHelpers({ messages: require('express-messages') });\n\n### Express 3+\n\nInstall [connect-flash](https://github.com/jaredhanson/connect-flash) and add them as middleware:\n\n```\napp.use(require('connect-flash')());\napp.use(function (req, res, next) {\n  res.locals.messages = require('express-messages')(req, res);\n  next();\n});\n```\n\n### Adding Messages\n\nOn the server:\n\n    req.flash(\"info\", \"Email queued\");\n    req.flash(\"info\", \"Email sent\");\n    req.flash(\"error\", \"Email delivery failed\");\n\nFor further information see [connect-flash](https://github.com/jaredhanson/connect-flash).\n\n### Rendering Messages\n\nCall the `messages()` function as specified by your rendering engine:\n\n[EJS](https://github.com/visionmedia/ejs):\n\n    <%- messages() %>\n\n[Jade](http://jade-lang.com/):\n\n    != messages()\n\nWhich will output the HTML:\n\n    <div id=\"messages\">\n      <ul class=\"info\">\n        <li>Email queued</li>\n        <li>Email sent</li>\n      </ul>\n      <ul class=\"error\">\n        <li>Email delivery failed</li>\n      </ul>\n    </div>\n\n## Using a custom template\n\nAlternatively you can specify a custom template (a file in the views directory of your [Express](http://expressjs.com) app).\n\n### Add a message template\n\nFor example, lets use the below custom message template named `my_message_template`.\n\n[EJS](https://github.com/visionmedia/ejs) (`my_message_template.ejs`):\n\n    <div id=\"messages\">\n    <% Object.keys(messages).forEach(function (type) { %>\n      <ul class=\"<%= type %>\">\n      <% messages[type].forEach(function (message) { %>\n        <li><%= message %></li>\n      <% }) %>\n      </ul>\n    <% }) %>\n    </div>\n\n[Jade](http://jade-lang.com/) (`my_message_template.jade`):\n\n    .messages\n      each type in Object.keys(messages)\n        ul(class=\"#{type}\")\n          each message in messages[type]\n            li= message\n\n### Call the message template\n\nNext, pass the template name, `my_message_template`, as a parameter to the `messages()` function.\n\n[EJS](https://github.com/visionmedia/ejs):\n\n    <%- messages('my_message_template', locals) %>\n\n[Jade](http://jade-lang.com/):\n\n    != messages('my_message_template', locals)\n\nThe message template will receive an object called `messages` of the form:\n\n    {\n      \"info\" : [\n        \"Email queued\",\n        \"Email sent\"\n      ],\n      \"error\": [\n        \"Email delivery failed\"\n      ]\n    }\n\n## Running Tests\n\n    $ npm test\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","readmeFilename":"Readme.md","homepage":"https://github.com/expressjs/express-messages#readme","repository":{"type":"git","url":"git+https://github.com/expressjs/express-messages.git"},"bugs":{"url":"https://github.com/expressjs/express-messages/issues"},"users":{"vishwasc":true,"ggomma":true,"ivan.marquez":true,"alexdudar":true,"tomchao":true,"rocket0191":true,"rfortune":true}}