{"id":17398461,"url":"https://github.com/vweevers/is-git-ref-name-valid","last_synced_at":"2026-01-20T15:32:49.179Z","repository":{"id":40576966,"uuid":"316791658","full_name":"vweevers/is-git-ref-name-valid","owner":"vweevers","description":"Check that a git reference name is well formed.","archived":false,"fork":false,"pushed_at":"2024-01-01T09:43:02.000Z","size":21,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-27T04:39:04.450Z","etag":null,"topics":["git","nodejs","npm-package","refname"],"latest_commit_sha":null,"homepage":"","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/vweevers.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-28T17:57:26.000Z","updated_at":"2025-09-24T21:22:03.000Z","dependencies_parsed_at":"2024-06-20T23:31:00.581Z","dependency_job_id":"463ae01e-269a-4062-baa8-960dcfac5142","html_url":"https://github.com/vweevers/is-git-ref-name-valid","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/is-git-ref-name-valid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-ref-name-valid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-ref-name-valid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-ref-name-valid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-ref-name-valid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/is-git-ref-name-valid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-ref-name-valid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28606142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["git","nodejs","npm-package","refname"],"created_at":"2024-10-16T14:56:52.460Z","updated_at":"2026-01-20T15:32:49.160Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-git-ref-name-valid\n\n**Check that a git reference name is well formed, per [`git-check-ref-format(1)`](https://git-scm.com/docs/git-check-ref-format).**\n\n[![npm status](http://img.shields.io/npm/v/is-git-ref-name-valid.svg)](https://www.npmjs.org/package/is-git-ref-name-valid)\n[![node](https://img.shields.io/node/v/is-git-ref-name-valid.svg)](https://www.npmjs.org/package/is-git-ref-name-valid)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Usage\n\n```js\nconst validRef = require('is-git-ref-name-valid')\n\nvalidRef('refs/heads/foo.bar') // true\nvalidRef('refs/heads/foo^bar') // false\n```\n\nSame as `git check-ref-format`, the reference name must contain a `/` by default. This can be disabled:\n\n```js\nvalidRef('ünicöde')       // false\nvalidRef('ünicöde', true) // true\n```\n\nTo validate branch names, for which there are additional rules, use [`is-git-branch-name-valid`](https://github.com/vweevers/is-git-branch-name-valid).\n\n## API\n\n### `validRef(name[, onelevel])`\n\nTakes a string `name` and an optional `onelevel` boolean. Returns true if `name` is well formed. Throws if `name` is not a string. If `onelevel` is true then `name` does not have to contain a `/`.\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install is-git-ref-name-valid\n```\n\n## License\n\n[MIT](LICENSE) © Vincent Weevers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fis-git-ref-name-valid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fis-git-ref-name-valid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fis-git-ref-name-valid/lists"}