{"_id":"express-slash","_rev":"23-5712170de308bf938e058d79a2373cb8","name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","dist-tags":{"latest":"2.0.1"},"versions":{"0.1.0":{"name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","version":"0.1.0","homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing"],"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"engines":{"node":">=0.8"},"dependencies":{},"main":"index.js","_id":"express-slash@0.1.0","dist":{"shasum":"4da830a954b0349e78f1c86efcc416ff3da70195","tarball":"https://registry.npmjs.org/express-slash/-/express-slash-0.1.0.tgz","integrity":"sha512-N8I+i+3z6kFj+mUI4LbS3nTRApdyqfqikllVjrNmdN1wQkKqJmXoMbKQMX90VA4CKFTUcB8ak8Me12o8nHfV2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFVZh6qc8CAajxsRc89vWMZN1nhEVOJMlXnIWHX4CNE+AiEAxkmkh8c5MnPCbtsaH8OERRCwdl9NvB3SqT2ZC6/aFgI="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"ericf","email":"eferraiuolo@gmail.com"},"maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}]},"0.2.0":{"name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","version":"0.2.0","homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing"],"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"engines":{"node":">=0.8"},"dependencies":{},"main":"index","_id":"express-slash@0.2.0","dist":{"shasum":"2fac29a4a030a82ede3e45903c92006852d6df25","tarball":"https://registry.npmjs.org/express-slash/-/express-slash-0.2.0.tgz","integrity":"sha512-IdRXrO50IW1YSfZaJJbBZLoNp39UrN60VBHnuVkTqd7uAo3oPDPPwVkBBz92/Q0w0PcfhOfOD34sg5d3DI+Ygw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDylnEnu5k4GpGsmW7vXbwq/EsTUBdCg7QnIHxfWe24QIhALhkWCpwGnyOWJ5Ukx0rZx4yk1Qt6u5bmYTU41tzftAt"}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"ericf","email":"eferraiuolo@gmail.com"},"maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}]},"0.2.1":{"name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","version":"0.2.1","homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing","modown"],"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"engines":{"node":">=0.8"},"dependencies":{},"main":"index","_id":"express-slash@0.2.1","dist":{"shasum":"064936b793e551761d4d86a1a6a45976dcbd3fd1","tarball":"https://registry.npmjs.org/express-slash/-/express-slash-0.2.1.tgz","integrity":"sha512-NGFmOtWnOMBaqZiKc94E8kymUuh2wf1hLLatGUkef8+32Z6V4NbZY0PFff1o6nq41QJp8/z9bMs4VMZAwRtWpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM7JmUu55aJZLb7UngMQ3XNeiKG23M+WfcB9a8+wcOwwIgO7zUH6Q4lt2XuTc3DUiKjV292iON5eVmnxk2jRjDGzc="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"ericf","email":"eferraiuolo@gmail.com"},"maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}]},"1.0.0":{"name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","version":"1.0.0","homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing","modown"],"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"engines":{"node":">=0.8"},"dependencies":{},"main":"index","_id":"express-slash@1.0.0","dist":{"shasum":"e1e6ce8c911612ddab5372c10be02ea8842982eb","tarball":"https://registry.npmjs.org/express-slash/-/express-slash-1.0.0.tgz","integrity":"sha512-n41guQVo8/LhkoApeAAWBNse1TKAJtsBl4h/uPPUprEahB1i/6j0K6/rE7fUXc9RDM7TVLCR6DVUUOLuLHhi1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQChSZPtoAE7ZzJLWx3xoIggXqif0+vY2HEffx+JjvZcOgIgaaNgkGao7/5JsDluxlWHGkDhN8BU0+rjOU0LD1uAeJs="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ericf","email":"eferraiuolo@gmail.com"},"maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}]},"1.0.1":{"name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","version":"1.0.1","homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing","modown"],"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"contributors":[{"name":"Bala Clark","email":"balaclark@gmail.com","url":"http://balaclark.com"}],"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"engines":{"node":">=0.8"},"dependencies":{},"devDependencies":{"mocha":"^1.20.1","istanbul":"^0.2.14","express":"^3.12.1","supertest":"^0.13.0"},"main":"index","scripts":{"test":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha test -- --reporter spec"},"_id":"express-slash@1.0.1","dist":{"shasum":"7cc35960d84e0a1872492c80a4831dfc3c95265e","tarball":"https://registry.npmjs.org/express-slash/-/express-slash-1.0.1.tgz","integrity":"sha512-dlNiQ4w09XcVYJt62Gz+4AQMf2mefkItsGXqECXcySqB8QmVBX1CQB0DhVtBu1gL35yW/QzEVFWb3hvlvYChzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPfF72A5kNISUyYYZzoGyVFCTEJKhARNsu1kRZzJTpkgIhANyzlDTGmAK+UvOISCV8XFXE2IO/YP2qFYIDki5nfxLs"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"ericf","email":"eferraiuolo@gmail.com"},"maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}]},"2.0.0":{"name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","version":"2.0.0","homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing","modown"],"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"contributors":[{"name":"Bala Clark","email":"balaclark@gmail.com","url":"http://balaclark.com"}],"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"dependencies":{},"devDependencies":{"mocha":"^1.20.1","istanbul":"^0.2.14","express":"^4.4.5","supertest":"^0.13.0"},"main":"index","scripts":{"test":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha test -- --reporter spec"},"_id":"express-slash@2.0.0","dist":{"shasum":"a78641c52096387fb56e826a9975bf3c802943d7","tarball":"https://registry.npmjs.org/express-slash/-/express-slash-2.0.0.tgz","integrity":"sha512-OB+dGR8jpyFDmdf8OcDkr4F7b99Db+iZGxHl9qGZUkm/9zVh3kjiz6znsVQAofTZfHUhHOlYmcEOcyLwpikfBA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSmgqCZnd7cPhftfsLTdimROJHxypXETMMk49sV9AJngIhAP9YkxZ1djQVTot/3Y4A4XWt5IcOUWhLoCKBKOWBgGnT"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"ericf","email":"eferraiuolo@gmail.com"},"maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}]},"2.0.1":{"name":"express-slash","description":"Express middleware for people who are anal about trailing slashes.","version":"2.0.1","homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing","modown"],"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"contributors":[{"name":"Bala Clark","email":"balaclark@gmail.com","url":"http://balaclark.com"}],"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"dependencies":{},"devDependencies":{"mocha":"^1.20.1","istanbul":"^0.2.14","express":"^4.4.5","supertest":"^0.13.0"},"main":"index","scripts":{"test":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha test -- --reporter spec"},"gitHead":"97be235699e89ab12b897f5dae86048a55c3de25","_id":"express-slash@2.0.1","_shasum":"76eb869fed8f71ae4f98785cbe00bf1bb454d627","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"ericf","email":"eferraiuolo@gmail.com"},"maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}],"dist":{"shasum":"76eb869fed8f71ae4f98785cbe00bf1bb454d627","tarball":"https://registry.npmjs.org/express-slash/-/express-slash-2.0.1.tgz","integrity":"sha512-iGpHqIS5qHPmNkBu+XMYjbqTWTMRFySJfe3txkMajRSyJa6Nh5rOi7KfMCM5pqBP3R+JPoemS61wJRjMZaILrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCL00EBrhqsg0PV9T2eFazj2Zecu2/kmyjwBe4ZcDvZHQIhAPTjiNo1OhqEDJOV5Ff3FkB9av0ijX+fNV55lFZvYhPy"}]}}},"readme":"Express Slash\n=============\n\n[![Dependency Status](https://gemnasium.com/ericf/express-slash.png)](https://gemnasium.com/ericf/express-slash)\n[![npm Version](https://badge.fury.io/js/express-slash.png)](https://npmjs.org/package/express-slash)\n\n[Express][] middleware for people who are anal about trailing slashes.\n\nIf you're a good person, then you enable Express' `\"strict routing\"` because\nyou understand the difference between `/about` and `/about/`. You know that\nthese URLs are not the same and they have different meanings. The trouble is,\nbeing a good person and caring about your trailing slashes is harder than not.\nPlus, you also care about other people, and it would be rude to 404 them when\nthey forget the trailing slash. Luckily, there's this package to solve all your\ntrailing slash problems :D\n\n**This Express middleware should come after your app's `router` middleware.**\nIt will handle [GET and HEAD] requests for URLs which did not have a matching\nroute by either adding or removing a trailing slash to the URL's path, then\nchecking the app's router for a matching route for the new URL, in which case it\nwill redirect the client (301 by default) to that URL.\n\n**Note:** Choose the correct version of this package for your Express version:\n\n* `v1.x`: Express 3.x\n* `v2.x`: Express 4.x\n\n\n[Express]: https://github.com/visionmedia/express\n\n\nInstallation\n------------\n\nInstall using npm:\n\n```shell\n$ npm install express-slash\n```\n\n\nUsage\n-----\n\nEnable Express' `\"strict routing\"` setting, and add this middleware after your\napp's `router` middleware:\n\n```javascript\nvar express = require('express'),\n    slash   = require('express-slash');\n\nvar app = express();\n\n// Because you're the type of developer who cares about this sort of thing!\napp.enable('strict routing');\n\n// Create the router using the same routing options as the app.\nvar router = express.Router({\n    caseSensitive: app.get('case sensitive routing'),\n    strict       : app.get('strict routing')\n});\n\n// Add the `slash()` middleware after your app's `router`, optionally specify\n// an HTTP status code to use when redirecting (defaults to 301).\napp.use(router);\napp.use(slash());\n\nrouter.get('/', function (req, res) {\n    res.send('Home');\n});\n\nrouter.get('/about/', function (req, res) {\n    res.send('About');\n});\n\nrouter.get('/about/people', function (req, res) {\n    res.send('People');\n});\n\napp.listen(3000);\n```\n\nNow when someone navigates to `/about`, they'll be redirected to `/about/`, and\nwhen someone navigates to `/about/people/`, they'll be redirected to\n`/about/people`.\n\n\nLicense\n-------\n\nThis software is free to use under the MIT license.\nSee the [LICENSE file][] for license text and copyright information.\n\n\n[LICENSE file]: https://github.com/ericf/express-slash/blob/master/LICENSE\n","maintainers":[{"name":"ericf","email":"eferraiuolo@gmail.com"}],"time":{"modified":"2022-06-17T22:40:00.299Z","created":"2013-03-10T02:42:21.647Z","0.1.0":"2013-03-10T02:42:22.656Z","0.2.0":"2013-04-20T19:51:30.909Z","0.2.1":"2013-11-06T05:11:13.195Z","1.0.0":"2014-01-03T16:41:09.523Z","1.0.1":"2014-07-02T15:15:42.572Z","2.0.0":"2014-07-02T20:35:25.650Z","2.0.1":"2014-07-09T05:57:08.986Z"},"author":{"name":"Eric Ferraiuolo","email":"eferraiuolo@gmail.com","url":"http://ericf.me/"},"repository":{"type":"git","url":"git://github.com/ericf/express-slash.git"},"users":{"shieldax":true,"rocket0191":true},"homepage":"https://github.com/ericf/express-slash","keywords":["express","express3","url","urls","slash","trailing","slashes","route","routes","routing","modown"],"bugs":{"url":"https://github.com/ericf/express-slash/issues"},"readmeFilename":"README.md","contributors":[{"name":"Bala Clark","email":"balaclark@gmail.com","url":"http://balaclark.com"}]}