# imweb-git-user-name

> Get a user's name from git config at the project or global scope, depending on what git uses in the current context.

Latest version **0.1.0** (published 2016-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install imweb-git-user-name
pnpm add imweb-git-user-name
yarn add imweb-git-user-name
bun add imweb-git-user-name
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-09-26 |
| First published | 2016-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | coolriver |
| Maintainers | imweb |
| Keywords | git, gitconfig, github, global, name, user, username |

## Links

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

## Dependencies (3)

- [isobject](https://npm.io/package/isobject.md) ^2.0.0
- [git-config-path](https://npm.io/package/git-config-path.md) ^0.2.0
- [parse-git-config](https://npm.io/package/parse-git-config.md) ^0.4.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-09-26

## README

# git-user-name [![NPM version](https://img.shields.io/npm/v/git-user-name.svg)](https://www.npmjs.com/package/git-user-name) [![Build Status](https://travis-ci.org/imweb/git-user-name.svg?branch=master)](https://travis-ci.org/imweb/git-user-name)

> Get a user's name from git config at the project or global scope, depending on what git uses in the current context.

## Install

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

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

## Usage

```js
var username = require('git-user-name');
console.log(username()); // log the local git user name
console.log(username(true)); // log the global git user name
//=> jonschlinkert
```

## Related projects

* [git-branch](https://www.npmjs.com/package/git-branch): Get the current branch for a local git repository. | [homepage](https://github.com/jonschlinkert/git-branch)
* [git-config-path](https://www.npmjs.com/package/git-config-path): Resolve the path to the user's global .gitconfig. | [homepage](https://github.com/jonschlinkert/git-config-path)
* [git-repo-name](https://www.npmjs.com/package/git-repo-name): Get the repository name from the git remote origin URL. | [homepage](https://github.com/jonschlinkert/git-repo-name)
* [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)
* [parse-git-config](https://www.npmjs.com/package/parse-git-config): Parse `.git/config` into a JavaScript object. sync or async. | [homepage](https://github.com/jonschlinkert/parse-git-config)

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/git-user-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/https://github.com/jonschlinkert)
Released under the [MIT license](https://github.com/jonschlinkert/git-user-name/blob/master/LICENSE).

***

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

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