{"id":23053625,"url":"https://github.com/component/router","last_synced_at":"2025-08-15T04:30:49.039Z","repository":{"id":7475795,"uuid":"8823934","full_name":"component/router","owner":"component","description":"Simple client-side router","archived":false,"fork":false,"pushed_at":"2013-08-21T17:31:35.000Z","size":62,"stargazers_count":31,"open_issues_count":2,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-03T07:05:18.362Z","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/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2013-03-16T19:05:49.000Z","updated_at":"2023-08-22T18:39:42.000Z","dependencies_parsed_at":"2022-07-25T20:00:32.807Z","dependency_job_id":null,"html_url":"https://github.com/component/router","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/component/router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Frouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Frouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Frouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Frouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Frouter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270523874,"owners_count":24600186,"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-08-15T02:00:12.559Z","response_time":110,"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-12-16T00:18:55.845Z","updated_at":"2025-08-15T04:30:48.795Z","avatar_url":"https://github.com/component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# router\n\n  Simple client-side router.\n\n## Installation\n\n    $ component install component/router\n\n## Examples\n\n  Example with only setup callbacks:\n\n```js\nvar Router = require('router');\n\nvar router = new Router;\n\nrouter.get('/user/:id', function(id){\n  console.log('show %s', id);\n});\n\nrouter.dispatch('/user/2');\n```\n\n  Setup and teardown callbacks for unbinding\n  events etc:\n\n```js\nvar Router = require('router');\n\nvar router = new Router;\n\nrouter.get('/user/:id', function(id){\n  console.log('show %s', id);\n}, function(id){\n  console.log('hide %s', id);\n});\n\nrouter.dispatch('/user/2');\nrouter.dispatch('/user/5');\nrouter.dispatch('/user/10');\n```\n\n  Fluent api equivalent of above:\n\n```js\nvar Router = require('router');\n\nvar router = new Router;\n\nrouter.get('/user/:id')\n.before(function(id){\n  console.log('show %s', id);\n})\n.after(function(id){\n  console.log('hide %s', id);\n});\n\nrouter.dispatch('/user/2');\nrouter.dispatch('/user/5');\nrouter.dispatch('/user/10');\n```\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Frouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Frouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Frouter/lists"}