npm.io
2.0.1 • Published 7 years ago

clean-git-ref

Licence
Apache-2.0
Version
2.0.1
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
4

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');