{"id":20963855,"url":"https://github.com/codemix/dispatching","last_synced_at":"2025-08-03T16:37:06.351Z","repository":{"id":57212937,"uuid":"20844158","full_name":"codemix/dispatching","owner":"codemix","description":"Tiny routing / dispatch library for node and the browser.","archived":false,"fork":false,"pushed_at":"2014-06-15T18:55:51.000Z","size":148,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-20T03:04:41.908Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codemix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-14T23:28:36.000Z","updated_at":"2015-12-03T07:26:11.000Z","dependencies_parsed_at":"2022-08-24T21:01:27.228Z","dependency_job_id":null,"html_url":"https://github.com/codemix/dispatching","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/codemix/dispatching","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fdispatching","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fdispatching/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fdispatching/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fdispatching/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemix","download_url":"https://codeload.github.com/codemix/dispatching/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemix%2Fdispatching/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263388795,"owners_count":23459270,"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","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-11-19T02:48:37.556Z","updated_at":"2025-07-03T19:33:47.714Z","avatar_url":"https://github.com/codemix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dispatching\n\n[![Build Status](https://travis-ci.org/codemix/dispatching.svg)](https://travis-ci.org/codemix/dispatching)\n\nURL routing library for node.js and the browser.\n\n## Installation\n\n```\nnpm install dispatching\n```\n\n## Usage\n\n```js\nvar dispatcher = new Dispatcher();\n\ndispatcher.add('/\u003ccontroller\u003e/\u003cid:\\\\d+\u003e/\u003caction\u003e', function (params) {\n  return params;\n});\n\ndispatcher.add('/\u003ccontroller\u003e/\u003cid:\\\\d+\u003e', function (params) {\n  return params;\n});\n\ndispatcher.add('/\u003ccontroller\u003e', function (params) {\n  return params;\n});\n\ndispatcher.dispatch('/users/123/update').should.eql({\n  controller: 'users',\n  action: 'update',\n  id: 123\n});\n\ndispatcher.dispatch('/users/123').should.eql({\n  controller: 'users',\n  id: 123\n});\n\ndispatcher.dispatch('/users').should.eql({\n  controller: 'users'\n});\n\n```\n\n\n## License\n\nMIT, see [LICENSE.md](./LICENSE.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fdispatching","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemix%2Fdispatching","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemix%2Fdispatching/lists"}