{"id":16124257,"url":"https://github.com/jongacnik/routebeer","last_synced_at":"2025-07-27T14:08:27.212Z","repository":{"id":20888757,"uuid":"24176099","full_name":"jongacnik/routebeer","owner":"jongacnik","description":"A little router for the browser for ajaxified sites.","archived":false,"fork":false,"pushed_at":"2015-11-12T05:41:44.000Z","size":152,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T03:49:11.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jongacnik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-18T06:06:22.000Z","updated_at":"2020-05-02T14:52:27.000Z","dependencies_parsed_at":"2022-08-30T15:53:02.608Z","dependency_job_id":null,"html_url":"https://github.com/jongacnik/routebeer","commit_stats":null,"previous_names":["amongiants/routebeer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jongacnik/routebeer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2Froutebeer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2Froutebeer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2Froutebeer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2Froutebeer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jongacnik","download_url":"https://codeload.github.com/jongacnik/routebeer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongacnik%2Froutebeer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267368932,"owners_count":24076093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T21:20:19.519Z","updated_at":"2025-07-27T14:08:27.184Z","avatar_url":"https://github.com/jongacnik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# routebeer\n\nA simple router for the browser best enjoyed with [pjax](https://github.com/thybag/PJAX-Standalone)\n\n**Some API Changes in version 0.1.8**\n\n## Usage\n\n\tvar routebeer = require('routebeer')\n\n\tvar router = routebeer({\n\t\talways : function (data) { // run on every navigate\n\t\t\tconsole.log(data)\n\t\t},\n\t\tnotFound : function (data) { // run on route not found\n\t\t\tconsole.log(data)\n\t\t},\n\t\troot : '/', // define optional base\n\t\tevent : 'pjax:success' // run route check on event\n\t})\n\t.add({ // add a route\n\t\tname : 'project',\n\t\tpath : '/projects/:project',\n\t\tload : function (r) { // run when navigating to route\n\t\t\tconsole.log(r) // r will contain route data, such as params\n\t\t},\n\t\tunload : function (r) { // run when navigating away from route\n\t\t\tconsole.log(r)\n\t\t}\n\t})\n\t.add({\n\t\tname : 'about',\n\t\tpath : '/about',\n\t\tload : function (r) {\n\t\t\tconsole.log(r)\n\t\t},\n\t\tunload : function (r) {\n\t\t\tconsole.log(r)\n\t\t}\n\t})\n\t.add({\n\t\tname : 'home',\n\t\tpath : '/',\n\t\tload : function (r) {\n\t\t\tconsole.log(r)\n\t\t},\n\t\tunload : function (r) {\n\t\t\tconsole.log(r)\n\t\t}\n\t})\n\t.navigate() // init\n\nPath definition using [path match](https://www.npmjs.org/package/path-match)\n\n### Remove\n\n\trouter.remove('home') // removes route\n\n### Events\n\n\trouter\n\t\t.on('load', function (r) {\n\n\t\t})\n\t\t.on('unload', function (r) {\n\n\t\t})\n\n## Bundled Version\n\nIf you don't want to mess with a build process you can also include the pre-bundled version found in routebeer.bundled.js in your project which exposes routebeer() globally.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongacnik%2Froutebeer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongacnik%2Froutebeer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongacnik%2Froutebeer/lists"}