# git-repo-name

> Get the repository name from the git remote origin URL.

Latest version **1.0.1** (published 2018-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-repo-name
pnpm add git-repo-name
yarn add git-repo-name
bun add git-repo-name
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-11-22 |
| First published | 2014-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/git-repo-name) |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | gh, git, git repo, repo, repo name, repository |

## Links

- npm: https://www.npmjs.com/package/git-repo-name
- Repository: https://github.com/jonschlinkert/git-repo-name
- Issues: https://github.com/jonschlinkert/git-repo-name/issues
- npm.io page: https://npm.io/package/git-repo-name

## Dependencies (1)

- [remote-origin-url](https://npm.io/package/remote-origin-url.md) ^2.0.0

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-11-22
- 1.0.0 — 2018-11-22
- 0.6.0 — 2016-05-03
- 0.5.1 — 2015-11-28
- 0.5.0 — 2015-11-04
- 0.4.1 — 2015-10-22
- 0.4.0 — 2015-10-20
- 0.3.1 — 2015-02-28
- 0.3.0 — 2015-02-28
- 0.2.0 — 2014-05-15
- 0.1.2 — 2014-04-04
- 0.1.1 — 2014-04-04
- 0.1.0 — 2014-04-04

## README

# git-repo-name [![NPM version](https://img.shields.io/npm/v/git-repo-name.svg?style=flat)](https://www.npmjs.com/package/git-repo-name) [![NPM downloads](https://img.shields.io/npm/dm/git-repo-name.svg?style=flat)](https://npmjs.org/package/git-repo-name) [![Build Status](https://img.shields.io/travis/jonschlinkert/git-repo-name.svg?style=flat)](https://travis-ci.org/jonschlinkert/git-repo-name)

Get the repository name from the git remote origin URL.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install git-repo-name --save
```

## Usage

```js
var repoName = require('git-repo-name');
```

By default `process.cwd()` is used, but you can alternatively specify a different directory as the first argument.

**async**

```js
repoName(function(err, name) {
  //=> 'git-repo-name'
});
```

**sync**

```js
repoName.sync();
//=> 'git-repo-name'
```

## cwd

Optionally specify the directory to use.

**async**

```js
repoName('foo', function(err, name) {
  //=> 'repo-foo-name'
});
```

**sync**

```js
repoName.sync('foo');
//=> 'repo-foo-name'
```

## Related projects

You might also be interested in these projects:

* [git-user-email](https://www.npmjs.com/package/git-user-email): Get the email address of the current user from git config. | [homepage](https://github.com/jonschlinkert/git-user-email)
* [git-username](https://www.npmjs.com/package/git-username): Get the username from a git remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username)

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/git-repo-name/issues/new).

## Building docs

Generate readme and API documentation with [verb](https://github.com/verbose/verb):

```sh
$ npm install verb && npm run docs
```

Or, if [verb](https://github.com/verbose/verb) is installed globally:

```sh
$ verb
```

## Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

## Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2016, [Jon Schlinkert](http://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/git-repo-name/blob/master/LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 03, 2016._

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