{"id":20504501,"url":"https://github.com/candyframework/fast-regexp-router","last_synced_at":"2026-02-10T08:32:09.623Z","repository":{"id":57233090,"uuid":"270270384","full_name":"candyframework/fast-regexp-router","owner":"candyframework","description":"快速正则路由","archived":false,"fork":false,"pushed_at":"2025-01-23T01:48:53.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-25T08:44:11.805Z","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/candyframework.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":"2020-06-07T10:27:43.000Z","updated_at":"2025-01-23T01:48:56.000Z","dependencies_parsed_at":"2023-02-12T15:01:10.813Z","dependency_job_id":null,"html_url":"https://github.com/candyframework/fast-regexp-router","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/candyframework/fast-regexp-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candyframework%2Ffast-regexp-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candyframework%2Ffast-regexp-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candyframework%2Ffast-regexp-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candyframework%2Ffast-regexp-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/candyframework","download_url":"https://codeload.github.com/candyframework/fast-regexp-router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/candyframework%2Ffast-regexp-router/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29294600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T03:42:42.660Z","status":"ssl_error","status_checked_at":"2026-02-10T03:42:41.897Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-15T19:38:26.245Z","updated_at":"2026-02-10T08:32:09.601Z","avatar_url":"https://github.com/candyframework.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Fast Router\n\n## Principle\n\n```typescript\nroute1 = '/'\nroute2 = '/user/{uid}'\nroute3 = '/posts/{id}'\n\n// The system will process these routes into the following format\n(?:\\\\/)|(?:\\\\/user\\\\/(\\\\w+))|(?:\\\\/posts\\\\/(\\\\w+))\n```\n\n## Usage\n\n```typescript\nimport FastRouter from 'fast-regexp-router'\n\nconst routesList = [\n    {\n        route: '/',\n        handler: () =\u003e {\n            console.log('index route requested')\n        }\n    },\n    {\n        route: '/user/{uid}',\n        handler: (params) =\u003e {\n            console.log('user requested, uid is: ' + params.uid);\n        }\n    },\n    {\n        route: '/posts/{id}',\n        handler: (params) =\u003e {\n            console.log('article requested, id is: ' + params.id);\n        }\n    }\n];\n\nconst reg = new FastRouter();\n// reg.setRoutes(routesList);\n// Or\nfor(let v of routesList) {\n    reg.setRoute(v);\n}\n\nconst match = reg.exec('/user/123');\nif(match) {\n    match.handler(match.parameters);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandyframework%2Ffast-regexp-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcandyframework%2Ffast-regexp-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcandyframework%2Ffast-regexp-router/lists"}