{"_id":"ramrod","_rev":"33-8d8aef60f141feb80f342ab5c16ab63b","name":"ramrod","description":"the router you'd write if you were writing a router","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"ramrod","version":"0.0.1","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"_npmUser":{"name":"wookiehangover","email":"sam@quickleft.com"},"_id":"ramrod@0.0.1","_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"d356c985eb2eb6d8a3e9556727b38fad3816cbde","tarball":"https://registry.npmjs.org/-/ramrod-0.0.1.tgz"},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}],"directories":{}},"0.0.2":{"name":"ramrod","version":"0.0.2","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"_id":"ramrod@0.0.2","dist":{"shasum":"86a32d8d400c0944c61520321f5b154c598d0df2","tarball":"https://registry.npmjs.org/-/ramrod-0.0.2.tgz"},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}],"directories":{}},"0.0.3":{"name":"ramrod","version":"0.0.3","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"keywords":["router","routing","routes"],"_id":"ramrod@0.0.3","dist":{"shasum":"210c5248d8e2e397a130afb2834f20b336c88f0b","tarball":"https://registry.npmjs.org/-/ramrod-0.0.3.tgz"},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}],"directories":{}},"0.0.4":{"name":"ramrod","version":"0.0.4","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"keywords":["router","routing","routes"],"_id":"ramrod@0.0.4","dist":{"shasum":"372528ae8da206e4b59a32ec34dd496766d84f1c","tarball":"https://registry.npmjs.org/ramrod/-/ramrod-0.0.4.tgz","integrity":"sha512-8v8bNY9vfXtfWfGr7qbC3ZQfLfvzhmkTmx+9arqh4SBxqWw1fhdnWYiqa80rdqPI9zNw7PqX5WBLmBwMR20bFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYPNg0Gx1QBHD6vh9t4MPLqrsqDXjE1w2NdUY5pKQJYQIhALl58YbfwhphL5jHlB0nulOtSlc1BlQkTUZiiTlYjkbO"}]},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}]},"0.0.5":{"name":"ramrod","version":"0.0.5","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"keywords":["router","routing","routes"],"_id":"ramrod@0.0.5","dist":{"shasum":"647c47bc3d3fe8ea659f23041a4a02f4239a284b","tarball":"https://registry.npmjs.org/ramrod/-/ramrod-0.0.5.tgz","integrity":"sha512-5oIDZJlbmmdoaZO7S51x3aWJ2Ga11fS8oYric5iXrZQdFqCXBhtvcsy5V34Pb/iFop6ODjNAxblHsEgQOEXolQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxHc8qkQjTvZuo8YRf1vIuWQdXL0F2fRMpz0tF7NOL0AiEA3s6Ruf2RQ+YiNWSS5X61Ikmgqsoe04T6SClYAZq8sDw="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"wookiehangover","email":"sam@quickleft.com"},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}]},"0.0.6":{"name":"ramrod","version":"0.0.6","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0","request":"~2.11.4"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"keywords":["router","routing","routes"],"_id":"ramrod@0.0.6","dist":{"shasum":"3b6e8e0c88243a17091286fdabd436c0eaa02e7d","tarball":"https://registry.npmjs.org/ramrod/-/ramrod-0.0.6.tgz","integrity":"sha512-AyQCfapu/8fxLPbAzWk0tioKKafCfOXWT2B2gLsyxRTxFLrufMnnqdz33gCKH//y6WHgwMP7LxXj+uCqXCSeaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEn8V+ELa+myiggBwVT6V2rnpWMe1hKdKDyFbESodwBOAiEA9EnpDcuhhbJGu3kgJ5rSmCrIccgKFwxdMw696Fc8y6I="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"wookiehangover","email":"sam@quickleft.com"},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}]},"0.0.7":{"name":"ramrod","version":"0.0.7","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0","request":"~2.11.4"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"keywords":["router","routing","routes"],"_id":"ramrod@0.0.7","dist":{"shasum":"6ebabf86eb9036d04004e380ebef904cea2a2510","tarball":"https://registry.npmjs.org/ramrod/-/ramrod-0.0.7.tgz","integrity":"sha512-D4kn9MGDPp6r2VUZvMOZD+UNJ08NTWRj/YLXuFD4o7WL2milgIa7A+tcu0+4GSDs8M03Yabz1cEOKLYz0VtvUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvra2TvRr/BE8tp/+WJoGcrlw+GDXVbZA+ioACwSwF0wIgOSOx6Q9LtqYkWTbu8ivtnUQIaJ6few/p8nyRYFhMxZg="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"wookiehangover","email":"sam@quickleft.com"},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}]},"0.0.8":{"name":"ramrod","version":"0.0.8","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha"},"license":"BSD","devDependencies":{"mocha":"~1.3.0","request":"~2.11.4"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"keywords":["router","routing","routes"],"_id":"ramrod@0.0.8","dist":{"shasum":"877dd6c16af7562cc719e6af2a0e3b9351a58ba3","tarball":"https://registry.npmjs.org/ramrod/-/ramrod-0.0.8.tgz","integrity":"sha512-4LbNtGDxGgJ579LqpFawo5cdOsyR+er5qAlJY3fR20Khj2cKgZgWXuy2MfWoDJdHg6NOnBLg/IF/49wf6f2oig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYKTczgr/yljJMQ1PrBlAr69eLw0+k2rfBHL6qbmO7LwIhAO+tzuzscvM1O5UUkgZT7g62NBKrOSaGRmu4qGxJUrry"}]},"_npmVersion":"1.1.59","_npmUser":{"name":"wookiehangover","email":"sam@quickleft.com"},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}]},"1.0.0":{"name":"ramrod","version":"1.0.0","description":"the router you'd write if you were writing a router","main":"index.js","scripts":{"test":"mocha","lint":"standard index.js"},"license":"BSD","devDependencies":{"mocha":"^3.4.2","request":"^2.81.0","standard":"^10.0.2"},"dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"keywords":["router","routing","routes"],"gitHead":"163617fcb1ba3ddf5da2abcb2ba9e2cea2379618","bugs":{"url":"https://github.com/wookiehangover/node-ramrod/issues"},"homepage":"https://github.com/wookiehangover/node-ramrod#readme","_id":"ramrod@1.0.0","_npmVersion":"5.0.2","_nodeVersion":"7.9.0","_npmUser":{"name":"wookiehangover","email":"samuel.breed@gmail.com"},"dist":{"integrity":"sha512-UlukbS+jW06uM9ZUr5RAjOVU+6sJmlgpndPOufs4oWZIC+WqLvCNWYHGLoYUHhytU9TAEqIrA9l6dBkHVbrkMg==","shasum":"dc64141fdf33c926f3e0f981f4a929c6387c78d4","tarball":"https://registry.npmjs.org/ramrod/-/ramrod-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJ6XzgLV/Xi7CAvtAMX1vM1y/DedXEcYeBEjCNzfHNFAiBO646rRCPFUV9vmQI/rfr4x7j4jeVMOIQeRpi95hs7Jg=="}]},"maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ramrod-1.0.0.tgz_1498796121614_0.06953475112095475"}}},"readme":"# Ramrod\n\n[![Build\nStatus](https://secure.travis-ci.org/wookiehangover/node-ramrod.png?branch=master)](http://travis-ci.org/wookiehangover/node-ramrod)\nv1.0.0\n\nAn extremely minimal router. Seriously, it's pretty much just an\nEventEmitter (but that's a good thing.) It's the router you'd write if\nyou were writing a router.\n\n## Usage\n\nAdd to your project with `npm install ramrod --add` and include it in\nyour node app. It's meant to be used with the `http` module. Here's what\nit looks like in action:\n\n    var http = require('http');\n    var ramrod = require('ramrod');\n    var router = ramrod();\n\n    router.add('my/:route', function(req, res, param ){\n      res.writeHead(200);\n      res.end('Hello '+ param +'\\n');\n    });\n\n    router.add('foo/:bar', function(req, res, param, querystring ){\n      res.writeHead(200);\n      res.end('Hello '+ param +'\\n');\n    });\n\n    router.on('*', function(req, res){\n      res.writeHead(200);\n      res.end('All other urls go here :)\\n');\n    });\n\n    http.createServer(function(req, res){\n      router.dispatch(req, res);\n    }).listen(3000);\n\n### ramrod([routes])\n\nReturns a Ramrod instance and takes an optional routes object as its\nonly argument.\n\nThe routes object takes the form:\n\n    {\n      'route/:param1/:param2': function( req, res, p1, p2 ){\n        // route handler\n      },\n\n      'namedRegExpRoute': /^custom\\/(reg|ex)/,\n\n      'route/:param': null\n    }\n\nRoutes can be processed as route/handler pairs, named\nRegular Expression routes, or a route directive with a null value.\n\n### ramrod.add(route, [name], [callback])\n\nRoute strings can contain `:params` and `*splats` that are passed to the\nroute's callback when matched.\n\nNamed routes can be useful for aliasing a complex route string. If the \n`name` is present, the route will be given that event name. E.g.:\n\n    router.add('foo/:bar', 'foo'); // router will emit a 'foo' event\n\nIf a funtion is passed as the last argument, it will be used as the\nhandler for the route being added. The callback is always passed the\n`http.ClientRequest` and `http.ClientResponse` objects as its first 2\narguments.\n\n    router.on('foo', function( req, res ){ ... });\n\n### ramrod.get(route, [name], [callback])\n\nAdds a route handler that will only be triggered when `req.method === GET`\n\n### ramrod.post(route, [name], [callback])\n\nAdds a route handler that will only be triggered when `req.method === POST`\n\n### ramrod.put(route, [name], [callback])\n\nAdds a route handler that will only be triggered when `req.method === PUT`\n\n### ramrod.del(route, [name], [callback])\n\nAdds a route handler that will only be triggered when `req.method === DELETE`\n\n### ramrod.on(event, callback)\n\n*Inhereted from EventEmitter*\n\nCallbacks recieve all the same arguments as when attached with `add`.\n\n### ramrod.dispatch(request, response)\n\nProcesses a request and a response object, emitting the first matched\nroute from the `ramrod.routes` object. A `before` event is emitted prior\nto matching against the route table. If no matching routes are found,\nthe '\\*' event is emitted.\n","maintainers":[{"name":"wookiehangover","email":"sam@quickleft.com"}],"time":{"modified":"2022-07-13T15:06:00.334Z","created":"2012-07-21T19:32:25.099Z","0.0.1":"2012-07-21T19:32:25.986Z","0.0.2":"2012-07-22T23:36:33.289Z","0.0.3":"2012-08-06T23:34:44.508Z","0.0.4":"2012-08-12T06:28:43.141Z","0.0.5":"2012-08-29T03:00:41.929Z","0.0.6":"2012-10-12T17:40:31.624Z","0.0.7":"2012-10-14T04:58:45.376Z","0.0.8":"2012-10-15T17:18:09.006Z","1.0.0":"2017-06-30T04:15:21.749Z"},"author":{"name":"wookiehangover","email":"sam@quickleft.com","url":"http://wookiehangover.com"},"repository":{"type":"git","url":"git://github.com/wookiehangover/node-ramrod.git"},"users":{"fgribreau":true,"nrn":true},"homepage":"https://github.com/wookiehangover/node-ramrod#readme","keywords":["router","routing","routes"],"bugs":{"url":"https://github.com/wookiehangover/node-ramrod/issues"},"license":"BSD","readmeFilename":"readme.md"}