{"id":17398459,"url":"https://github.com/vweevers/is-git-branch-name-valid","last_synced_at":"2026-02-14T16:05:42.249Z","repository":{"id":40576967,"uuid":"316808100","full_name":"vweevers/is-git-branch-name-valid","owner":"vweevers","description":"Check that a git branch name is well formed.","archived":false,"fork":false,"pushed_at":"2023-11-01T10:06:39.000Z","size":12,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T08:43:22.329Z","etag":null,"topics":["branch","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-28T19:34:57.000Z","updated_at":"2022-11-16T04:10:40.000Z","dependencies_parsed_at":"2024-06-21T13:13:52.457Z","dependency_job_id":"e23858f2-2e03-4ae6-9283-f404e2b7c7dc","html_url":"https://github.com/vweevers/is-git-branch-name-valid","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-branch-name-valid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-branch-name-valid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-branch-name-valid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fis-git-branch-name-valid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/is-git-branch-name-valid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569129,"owners_count":20959758,"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":["branch","git","nodejs","npm-package","refname"],"created_at":"2024-10-16T14:56:50.844Z","updated_at":"2026-02-14T16:05:37.213Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-git-branch-name-valid\n\n**Check that a git branch name is well formed.**\n\n[![npm status](http://img.shields.io/npm/v/is-git-branch-name-valid.svg)](https://www.npmjs.org/package/is-git-branch-name-valid)\n[![node](https://img.shields.io/node/v/is-git-branch-name-valid.svg)](https://www.npmjs.org/package/is-git-branch-name-valid)\n![Test](https://github.com/vweevers/is-git-branch-name-valid/workflows/Test/badge.svg?branch=main)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Usage\n\n```js\nconst validBranch = require('is-git-branch-name-valid')\n\nvalidBranch('foo.bar')     // true\nvalidBranch('foo-bar/baz') // true\nvalidBranch('foo^bar')     // false\nvalidBranch('HEAD')        // false\nvalidBranch('-foo')        // false\n```\n\n## API\n\n### `validBranch(name)`\n\nTakes a string `name`. Returns true if `name`:\n\n1. Is a [valid reference name](https://github.com/vweevers/is-git-ref-name-valid)\n2. Does not equal `HEAD` or start with `-`.\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install is-git-branch-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-branch-name-valid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fis-git-branch-name-valid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fis-git-branch-name-valid/lists"}