securityos/node_modules/clean-git-ref/README.md

23 lines
514 B
Markdown
Raw Normal View History

2024-09-06 15:32:35 +00:00
# clean-git-ref
[![Build Status](https://travis-ci.org/TheSavior/clean-git-ref.svg)](https://travis-ci.org/TheSavior/clean-git-ref)
Clean an input string into a usable git ref.
For more reference, read https://git-scm.com/docs/git-check-ref-format
## Installation
```sh
$ 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');
```