is-git-branch-name-valid
Check that a git branch name is well formed.
Usage
const validBranch = // true // true // false // false // false
API
validBranch(name)
Takes a string name
. Returns true if name
:
- Is a valid reference name
- Does not equal
HEAD
or start with-
.
Install
With npm do:
npm install is-git-branch-name-valid
License
MIT © Vincent Weevers