Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/diegohaz/is-git-rev

Verify if a string is a git-rev hash
https://github.com/diegohaz/is-git-rev

git-rev nodejs

Last synced: 19 days ago
JSON representation

Verify if a string is a git-rev hash

Awesome Lists containing this project

README

        

# is-git-rev

[![Generated with nod](https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square)](https://github.com/diegohaz/nod)
[![NPM version](https://img.shields.io/npm/v/is-git-rev.svg?style=flat-square)](https://npmjs.org/package/is-git-rev)
[![Build Status](https://img.shields.io/travis/diegohaz/is-git-rev/master.svg?style=flat-square)](https://travis-ci.org/diegohaz/is-git-rev) [![Coverage Status](https://img.shields.io/codecov/c/github/diegohaz/is-git-rev/master.svg?style=flat-square)](https://codecov.io/gh/diegohaz/is-git-rev/branch/master)

Verify if a string is a git-rev hash

## Install

$ npm install --save is-git-rev

## Usage

```js
import isGitRev from 'is-git-rev'

isGitRev('f9b9150f71db48a49a2e3de5f817cec120334d81')
```

## API

### isGitRev

Verify if `hash` is a git-rev sha1 hash.

**Parameters**

- `hash` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**

Returns **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**

## License

MIT © [Diego Haz](https://github.com/diegohaz)