{"id":22273092,"url":"https://github.com/mac-/coordinate","last_synced_at":"2025-10-12T00:42:33.459Z","repository":{"id":22336358,"uuid":"25671980","full_name":"mac-/coordinate","owner":"mac-","description":"A router based on the hapijs call module targeted at the browser","archived":false,"fork":false,"pushed_at":"2015-04-26T14:36:13.000Z","size":172,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-21T18:43:43.351Z","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/mac-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-24T04:44:24.000Z","updated_at":"2015-04-26T14:36:04.000Z","dependencies_parsed_at":"2022-08-20T22:50:31.756Z","dependency_job_id":null,"html_url":"https://github.com/mac-/coordinate","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mac-/coordinate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mac-%2Fcoordinate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mac-%2Fcoordinate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mac-%2Fcoordinate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mac-%2Fcoordinate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mac-","download_url":"https://codeload.github.com/mac-/coordinate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mac-%2Fcoordinate/sbom","scorecard":{"id":609100,"data":{"date":"2025-08-11","repo":{"name":"github.com/mac-/coordinate","commit":"87b7dd2ac33bca44de3e6ab40188e3ed62cf808c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":-1,"reason":"no workflows found","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/9 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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-21T02:13:52.609Z","repository_id":22336358,"created_at":"2025-08-21T02:13:52.609Z","updated_at":"2025-08-21T02:13:52.609Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009508,"owners_count":26084609,"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-10-11T02:00:06.511Z","response_time":55,"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-03T13:09:43.849Z","updated_at":"2025-10-12T00:42:33.430Z","avatar_url":"https://github.com/mac-.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coordinate\n\nA router for client-side (browser) JS applications.\n\nFeatures:\n* implements the routing strategy from [HapiJS](http://hapijs.com/api#path-matching-order) (uses [call](https://github.com/hapijs/call) under the covers)\n* emits events instead of calling callbacks of function handlers when a route is hit\n* supports using the url hash or the HTML5 history API\n\n\n[![Build Status](https://secure.travis-ci.org/mac-/coordinate.png)](http://travis-ci.org/mac-/coordinate)\n[![Coverage Status](https://coveralls.io/repos/mac-/coordinate/badge.png)](https://coveralls.io/r/mac-/coordinate)\n[![NPM version](https://badge.fury.io/js/coordinate.png)](http://badge.fury.io/js/coordinate)\n[![Dependency Status](https://david-dm.org/mac-/coordinate.png)](https://david-dm.org/mac-/coordinate)\n\n[![NPM](https://nodei.co/npm/coordinate.png?downloads=true\u0026stars=true)](https://nodei.co/npm/coordinate/)\n\n## Contributing\n\nThis module makes use of a `Makefile` for building/testing purposes. After obtaining a copy of the repo, run the following commands to make sure everything is in working condition before you start your work:\n\n\tmake install\n\tmake test\n\nBefore committing a change to your fork/branch, run the following commands to make sure nothing is broken:\n\n\tmake test\n\tmake test-cov\n\nDon't forget to bump the version in the `package.json` using the [semver](http://semver.org/spec/v2.0.0.html) spec as a guide for which part to bump. Submit a pull request when your work is complete.\n\n***Notes:***\n* Please do your best to ensure the code coverage does not drop. If new unit tests are required to maintain the same level of coverage, please include those in your pull request.\n* Please follow the same coding/formatting practices that have been established in the module.\n\n## Installation\n\n\tnpm install coordinate\n\n## Usage\n\nThis module assumes that you are using [browserify](http://browserify.org/) to bundle your client-side code.\n\nTo use the router, require it in and initialize it like so:\n\n```js\nvar router = require('coordinate').getInstance(),\n\troutes = [ '/', '/users', '/users/{userId}' ];\n\nrouter.on('change', function(data) {\n\tconsole.log(data.route);       // the string route that was hit\n\tconsole.log(data.path);        // the raw path\n\tconsole.log(data.queryString); // the raw query string is on the url\n\tconsole.log(data.queryPath);   // the parsed query string object\n\tconsole.log(data.params);      // an object that contains any path parameters\n\tconsole.log(data.context);     // context data that was passed to the router.go method\n\tconsole.log(data.history);     // an Array of strings that contain the past paths that were navigated to\n});\n\nrouter.initialize({ routes: routes });\n\n```\n\n# API\n\nThe following methods are available on the `router` instance:\n\n## `initialize(options:Object)`\n\nInitializes the routes. This method must be called before any of the other methods.\n\n### `options`\n\nAn object that contains the information needed to configure the router.\n\n#### `routes`\n\nA collection of valid routes.\n\nRequired.\n\n#### `root`\n\nThe root path that all routes are appended to. For example, if the root is set to '/api', and there is a route '/users', then the expected full path would either be '/api/users' or '/api/#/users' depending on whether it is using the URL hash or HTML5 history API.\n\nDefaults to `'/'`\n\n#### `isCaseSensitive`\n\nA flag that denotes whether the provided route paths should be considered case sensitive or not.\n\nDefaults to `false`\n\n#### `useHash`\n\nA flag that denotes whether or not to use the hash for route paths, or to use the HTML5 history API.\n\nDefaults to `false`\n\n\n\n## `go(path:String, context:Object)`\n\nLooks up the route associated to the path, changes the hash or url in the browser, and emits a change event with the route that was hit, the path parameters, the query string values, the context that was passed, and an array of the history of previous paths hit.\n\n### \n\n# License\n\nThe MIT License (MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmac-%2Fcoordinate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmac-%2Fcoordinate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmac-%2Fcoordinate/lists"}