thvd / clean-git-ref

Clean an input string into a usable git ref

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Clean an input string into a usable git ref


Languages

Language:JavaScript 100.0%