{"_id":"routie-2","_rev":"3-e9413f313c44a4a34d33b11a2c8d9097","name":"routie-2","description":"Routie is a javascript hash routing library.  It is designed for scenarios when push state is not an option (IE8 support, static/Github pages, Phonegap, simple sites, etc). It is very tiny (800 bytes gzipped), and should be able to handle all your routing","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"routie-2","version":"1.0.0","description":"Routie is a javascript hash routing library.  It is designed for scenarios when push state is not an option (IE8 support, static/Github pages, Phonegap, simple sites, etc). It is very tiny (800 bytes gzipped), and should be able to handle all your routing","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/leventekk/routie.git"},"author":{"name":"Szekeres Barnabas","email":"barnabas@kuix.co","url":"http://kuix.co"},"license":"ISC","bugs":{"url":"https://github.com/leventekk/routie/issues"},"homepage":"https://github.com/leventekk/routie#readme","gitHead":"89fe8935fc5696498646a4bb799b8d9a5aa64ac4","_id":"routie-2@1.0.0","_shasum":"9f4ad8106f2efdb70f0a4c3fbea8f6e53dfd856c","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"barnabas","email":"barnabas@kuix.co"},"dist":{"shasum":"9f4ad8106f2efdb70f0a4c3fbea8f6e53dfd856c","tarball":"https://registry.npmjs.org/routie-2/-/routie-2-1.0.0.tgz","integrity":"sha512-i03006OWdQFBq1gZf4pExERSRW9hKVDaz8E0OWjexUyli9SPunkZzp+lot1UHZe7n/rj5NKW7/yDsXRC1L2w/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAfO+xA7OXdHmMvjTwul8teOgmmeCCXXHb4yl8wFPJ1mAiEAgCxUOpvjClGetufUiRXgs2l//FgrUESd4JZ45E84flw="}]},"maintainers":[{"name":"barnabas","email":"barnabas@kuix.co"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/routie-2-1.0.0.tgz_1472720647507_0.17641206341795623"}}},"readme":"#Routie\n\nRoutie is a javascript hash routing library.  It is designed for scenarios when push state is not an option (IE8 support, static/Github pages, Phonegap, simple sites, etc). It is very tiny (800 bytes gzipped), and should be able to handle all your routing needs.\n\n##Download\n\n- [Source](https://github.com/jgallen23/routie)\n\n##Basic Usage\n\nThere are three ways to call routie:\n\nHere is the most basic way:\n\n```js\nroutie('users', function() {\n  //this gets called when hash == #users\n});\n```\n\nIf you want to define multiple routes you can pass in an object like this:\n\n```js\nroutie({\n  'users': function() {\n\n  },\n  'about': function() {\n  }\n});\n```\n\nIf you want to trigger a route manually, you can call routie like this:\n\n```js\nroutie('users/bob');  //window.location.hash will be #users/bob\n```\n\n##Regex Routes\n\nRoutie also supports regex style routes, so you can do advanced routing like this:\n\n```js\nroutie('users/:name', function(name) {\n  //name == 'bob';\n});\nroutie('users/bob');\n```\n\n###Optional Params:\n```js\nroutie('users/:name?', function(name) {\n  //name == undefined\n  //then\n  //name == bob\n});\nroutie('users/');\nroutie('users/bob');\n```\n\n###Wildcard:\n```js\nroutie('users/*', function() {\n});\nroutie('users/12312312');\n```\n\n###Catch All:\n```js\nroutie('*', function() {\n});\nroutie('anything');\n```\n\n##Named Routes\n\nNamed routes make it easy to build urls for use in your templates.  Instead of re-creating the url, you can just name your url when you define it and then perform a lookup.  The name of the route is optional.  The syntax is \"\\[name\\] \\[route\\]\".\n\n```js\nroutie('user users/:name', function() {});\n```\n\nthen in your template code, you can do:\n\n```js\nroutie.lookup('user', { name: 'bob'}) // == users/bob\n```\n\n\n##Dependencies\n\nNone\n\n##Supports\n\nAny modern browser and IE8+\n\n##Tests\n\nRun `make install`, then `make test`, then go to http://localhost:8000/test\n","maintainers":[{"name":"barnabas","email":"barnabas@kuix.co"}],"time":{"modified":"2022-06-26T14:21:13.024Z","created":"2016-09-01T09:04:09.043Z","1.0.0":"2016-09-01T09:04:09.043Z"},"homepage":"https://github.com/leventekk/routie#readme","repository":{"type":"git","url":"git+https://github.com/leventekk/routie.git"},"author":{"name":"Szekeres Barnabas","email":"barnabas@kuix.co","url":"http://kuix.co"},"bugs":{"url":"https://github.com/leventekk/routie/issues"},"license":"ISC","readmeFilename":"README.md"}