{"id":17892744,"url":"https://github.com/neetjn/core-routing","last_synced_at":"2026-01-30T09:02:01.219Z","repository":{"id":35110783,"uuid":"202946235","full_name":"neetjn/core-routing","owner":"neetjn","description":"Framework agnostic interface for client sided routing using the HTML5 history api.","archived":false,"fork":false,"pushed_at":"2023-01-07T08:49:11.000Z","size":1058,"stargazers_count":0,"open_issues_count":19,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T08:47:13.379Z","etag":null,"topics":["client","framework","javascript","js","node","route","routing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/neetjn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-18T01:16:08.000Z","updated_at":"2019-10-10T22:23:50.000Z","dependencies_parsed_at":"2023-01-15T14:02:06.552Z","dependency_job_id":null,"html_url":"https://github.com/neetjn/core-routing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neetjn/core-routing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neetjn%2Fcore-routing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neetjn%2Fcore-routing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neetjn%2Fcore-routing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neetjn%2Fcore-routing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neetjn","download_url":"https://codeload.github.com/neetjn/core-routing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neetjn%2Fcore-routing/sbom","scorecard":{"id":678541,"data":{"date":"2025-08-11","repo":{"name":"github.com/neetjn/core-routing","commit":"4ecea0df223bdb533e1c63c0289ddc8837a655f8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/continuous-integration.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/neetjn/core-routing/continuous-integration.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/neetjn/core-routing/continuous-integration.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/continuous-integration.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/neetjn/core-routing/continuous-integration.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"89 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9","Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f","Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr","Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-876r-hj45-fw7g","Warn: Project is vulnerable to: GHSA-v63x-xc9j-hhvq","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-w5q7-3pr9-x44w","Warn: Project is vulnerable to: GHSA-3fjq-93xj-3f3f","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T22:20:23.982Z","repository_id":35110783,"created_at":"2025-08-21T22:20:23.982Z","updated_at":"2025-08-21T22:20:23.982Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28910604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["client","framework","javascript","js","node","route","routing"],"created_at":"2024-10-28T14:44:13.366Z","updated_at":"2026-01-30T09:02:01.201Z","avatar_url":"https://github.com/neetjn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# core-routing\n\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fneetjn%2Fcore-routing%2Fbadge\u0026style=flat)](https://actions-badge.atrox.dev/neetjn/core-routing/goto)\n[![codecov](https://codecov.io/gh/neetjn/core-routing/branch/master/graph/badge.svg)](https://codecov.io/gh/neetjn/core-routing)\n[![npm version](https://badge.fury.io/js/core-routing.svg)](https://badge.fury.io/js/core-routing)\n\n[![NPM](https://nodei.co/npm/core-routing.png)](https://nodei.co/npm/core-routing/)\n\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nFramework agnostic interface for client sided routing using the HTML5 history api.\n\n### Support\n\n\u003e Support is available for older browsers without the HTML 5 history api, however events may be dispatched irregularly and all features may not be available.\n\n| Chome  | Edge | Firefox | Opera    | Safari |\n|--------|------|---------|----------|--------|\n| 5.0+ ✔ |  ✔   | 4.0+ ✔  | 11.50+ ✔ | 5.0+ ✔ |\n\n### About\n\n\u003e This project is still in it's infancy phase, and there is no single specification for the client api.\n\nThis project was created in wake of a redesign of the [riot-view-router](https://github.com/neetjn/riot-view-router) project. It was designed from the ground up to be a reliable, speedy, framework agnostic interface for client sided routing using the HTML 5 history api. This framework aims not to define a paradigm from which developers can flesh out framework specific routers, but to provide an interface to help make the process much simpler and more streamline.\n\n## Install\n\nTo install via NPM:\n```sh\nnpm install core-routing\n```\nFor a quick start using jsdelivr:\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/core-routing/dist/core-routing.prod.js\"\u003e\u003c/script\u003e\n```\n\n### Use\n\nThe router at it's core is quite simple to use. The bundle exposes a UMD module that can be imported with CommonJS:\n\n```js\nconst Router = require('core-routing');\n```\n\nor ES6\n\n```js\nimport Router from 'core-routing'\n```\n\nWhen referencing from a browser, a global definition `Router` will be exposed:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/core-routing/dist/core-routing.prod.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  const router = new Router(...);\n\u003c/script\u003e\n```\n\nThe constructor takes an object in the form:\n\n```js\n{\n  client?: {\n    onStart?: =\u003e (e) { },\n    onNavigate?: =\u003e (e) { },\n    onStop?: (e) =\u003e { }\n  },\n  config?: {\n    ...\n  }\n}\n```\n\nEvent details/structure can be seen [here](https://github.com/neetjn/core-routing/blob/master/src/interfaces/event.d.ts).\n\n### Example\n\n```html\n\u003ch1\u003eRoute: \u003cspan id=\"context\"\u003e\u003c/span\u003e\u003c/h1\u003e\n\u003ch1\u003eDetails: \u003cspan id=\"details\"\u003e\u003c/span\u003e\u003c/h1\u003e\n\u003cscript\u003e\n  window.onload = e =\u003e {\n    const context = document.querySelector(\"#context\");\n    const details = document.querySelector(\"#details\");\n    \n    const routes = [\n      {\n        path: \"/\",\n        name: \"home\"\n      },\n      {\n        path: \"/user/:userId/profile\",\n        name: \"user-profile\"\n      },\n      {\n        path: \"*\",\n        name: \"not-found\"\n      }\n    ];\n\n    const matchRoute = e =\u003e {\n      // match defined routes w/ current location\n      const route = routes.find(r =\u003e e.$tools.match(e.location.path, r.path));\n      if (route) {\n        // when route matched\n        context.innerText = route.name;\n        const routeDetails = e.$tools.process(e.location.path, route.path);\n        details.innerText = JSON.stringify(routeDetails);\n      } else {\n        // when no route matched\n        context.innerText = \"{ PLEASE DEFINE A FALLBACK ROUTE }\";\n        details.innerText = \"{ }\";\n      }\n    };\n\n    const router = new Router({\n      client: {\n        onStart(event) {\n          console.log('Started');\n          // process route on start\n          matchRoute(event);\n        },\n        onNavigate(event) {\n          console.log('Navigated!');\n          // process route on navigation\n          matchRoute(event);\n        },\n        onStop(event) {\n          console.log('Stopped!');\n        }\n      }\n    });\n\n    const navigateEvent = (e) =\u003e {\n      console.log('Navigate Event Handler Called!');\n      // remove defined event handler from router\n      router.off(navigateEvent);\n    };\n\n    // run event handler a single time\n    router.once('navigate', navigateEvent);\n    // dynamically specify event handler\n    router.on('start', (e) =\u003e {\n      console.log('Start Event Handler Called!');\n    });\n\n    // start router\n    router.start();\n  };\n\u003c/script\u003e\n```\n\n## Development\n\nThis project uses [prettier]() for code styling and leverages [tslint]() and [jslint]() to ensure consistency. For testing, we use [Jest]() with [jest-dom](). Refer to the following npm commands to simplify your development workflow:\n\n* **lint** - Lint core project and tests.\n* **pretty** - Use prettier to clean/format core project (using prettier-tslint to abide by our tslint rules).\n* **bundle:prod** - Bundle the project for production (output to `dist/router.prod.js`).\n* **bundle:dev** - Bundle the project for development (output to `dist/router.dev.js`).\n* **bundle** - Bundle the project for both development and production.\n* **test** - Run test suite.\n* **build** - Lint, bundle, and test the project.\n\nAs a general rule of thumb, please reach out to lead maintainers before adding any new jslint or tslint rules.\n\n## Contributors\n\n* **John Nolette** (john@neetgroup.net)\n\nContributing guidelines are as follows,\n\n* Any new features or bug fixes must include either a test.\n  * Branches for bugs and features should be structured like so, `issue-x-username`.\n* Before putting in a pull request, be sure to verify you've built all your changes and your code adheres to the defined TS and JS style rules.\n  * Use `npm run lint` to lint your code and `npm run pretty` to format.\n* Include your name and email in the contributors list.\n\n---\n\nCopyright (c) 2019 John Nolette Licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneetjn%2Fcore-routing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneetjn%2Fcore-routing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneetjn%2Fcore-routing/lists"}