# gh-resolve

> Resolve a semver version, branch name or commit hash to git ref

Latest version **5.2.1** (published 2016-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install gh-resolve
pnpm add gh-resolve
yarn add gh-resolve
bun add gh-resolve
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.2.1 |
| Published | 2016-03-23 |
| First published | 2014-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | yields, mattmueller, dominicbarnes, stephenmathieson |

## Links

- npm: https://www.npmjs.com/package/gh-resolve
- Repository: https://github.com/duojs/gh-resolve
- Issues: https://github.com/duojs/gh-resolve/issues
- npm.io page: https://npm.io/package/gh-resolve

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [semver](https://npm.io/package/semver.md) ^4.3.6
- [conceal](https://npm.io/package/conceal.md) ^1.0.0
- [unyield](https://npm.io/package/unyield.md) 0.0.1
- [co-retry](https://npm.io/package/co-retry.md) ^1.0.5
- [duo-parse](https://npm.io/package/duo-parse.md) ^0.5.0
- [co-request](https://npm.io/package/co-request.md) ^0.2.1

## Recent versions

- 5.2.1 (latest) — 2016-03-23
- 5.1.1 — 2015-07-11
- 5.1.0 — 2015-07-10
- 5.0.1 — 2015-07-10
- 5.0.0 — 2015-07-10
- 4.0.0 — 2015-07-06
- 3.1.0 — 2015-03-02
- 3.0.4 — 2014-09-25
- 3.0.3 — 2014-08-16
- 3.0.2 — 2014-08-15
- 3.0.1 — 2014-08-03
- 3.0.0 — 2014-08-02
- 2.0.2 — 2014-07-02
- 2.0.1 — 2014-07-02
- 2.0.0 — 2014-06-23
- … 11 more at https://npm.io/package/gh-resolve/versions

## README

# gh-resolve

[![npm package](https://img.shields.io/npm/v/gh-resolve.svg)](https://www.npmjs.com/package/gh-resolve)
[![travis build status](https://img.shields.io/travis/duojs/gh-resolve.svg)](https://travis-ci.org/duojs/gh-resolve)

> Resolves a semver version, branch name or commit hash to git ref.

## resolve(slug, options)

```js
var ref = yield resolve('component/component@0.19.6', { token: token });

ref.name  // 0.19.6
ref.sha   // 6d6501d002aef91f1261f6ec98c6ed32046fe46a
ref.type  // tag
```

This method can be with either `yield` or a `callback`. (thanks to `unyield`)

### Available `options`

 * `token` highly recommended, but not _required_.
 * `password` alias for `token`
 * `cache` a cache instance provided by duo

## License

  (MIT)

---
_Source: https://npm.io/package/gh-resolve · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
