# parse-user-repo

> Parse a username/repo string

Latest version **2.0.0** (published 2018-12-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install parse-user-repo
pnpm add parse-user-repo
yarn add parse-user-repo
bun add parse-user-repo
```

## 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 | 2.0.0 |
| Published | 2018-12-22 |
| First published | 2015-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shinnosuke Watanabe |
| Maintainers | shinnn |
| Keywords | string, user, username, repo, repository, parse, object, github, shorthand, browser, client-side |

## Links

- npm: https://www.npmjs.com/package/parse-user-repo
- Repository: https://github.com/shinnn/parse-user-repo
- Homepage: https://github.com/shinnn/parse-user-repo#readme
- Issues: https://github.com/shinnn/parse-user-repo/issues
- npm.io page: https://npm.io/package/parse-user-repo

## Dependencies (1)

- [append-type](https://npm.io/package/append-type.md) ^1.0.1

## Recent versions

- 2.0.0 (latest) — 2018-12-22
- 2.0.0-1 (next) — 2018-12-22
- 2.0.0-0 — 2018-12-21
- 1.0.1 — 2016-01-20
- 1.0.0 — 2015-12-28

## README

# parse-user-repo

[![npm version](https://img.shields.io/npm/v/parse-user-repo.svg)](https://www.npmjs.com/package/parse-user-repo)
[![Build Status](https://travis-ci.com/shinnn/parse-user-repo.svg?branch=master)](https://travis-ci.com/shinnn/parse-user-repo)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/parse-user-repo.svg)](https://coveralls.io/github/shinnn/parse-user-repo?branch=master)

Parse a `username/repo` string

## Installation

[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).

```
npm install parse-user-repo
```

## API

```javascript
import parseUserRepo from 'parse-user-repo';
```

### parseUserRepo(*str*)

*str*: `string` (`user/repo` style repository identifier, for example <https://github.com/holman/spark> → `'holman/spark'`)  
Return: `Object` (`{username: ..., repo: ...}`)

It extracts a username and a repository name from a `user/repo` string and creates an `Object`.

```javascript
parseUserRepo('gohugoio/hugo'); //=> {username: 'gohugoio', repo: 'hugo'}
```

## License

[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe

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