2.0.1 • Published 5 years ago

clean-git-ref v2.0.1

Weekly downloads
81,712
License
Apache-2.0
Repository
github
Last release
5 years ago

clean-git-ref

Build Status

Clean an input string into a usable git ref.

For more reference, read https://git-scm.com/docs/git-check-ref-format

Installation

$ npm install clean-git-ref --save-dev

API Usage

clean(string input) -> string output

var cleanGitRef = require('clean-git-ref');

assert.strictEqual(cleanGitRef.clean('bad git ref formats/'), 'bad-git-ref-formats');