# extract-github

> Extract the Github project / repository URL from a given object

Latest version **1.0.0** (published 2015-11-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install extract-github
pnpm add extract-github
yarn add extract-github
bun add extract-github
```

## 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 | 1.0.0 |
| Published | 2015-11-11 |
| First published | 2014-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Arnout Kazemier |
| Maintainers | jcrugzz, indexzero, swaagie, v1, 3rdeden |
| Keywords | extract, github, url, repository, project, username, repo |

## Links

- npm: https://www.npmjs.com/package/extract-github
- Repository: https://github.com/3rd-Eden/extract-github
- Issues: https://github.com/3rd-Eden/extract-github/issues
- npm.io page: https://npm.io/package/extract-github

## 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

- 1.0.0 (latest) — 2015-11-11
- 0.0.5 — 2014-06-29
- 0.0.3 — 2014-03-03
- 0.0.2 — 2014-02-26
- 0.0.1 — 2014-02-20

## README

# extract-github

[![Build Status](https://travis-ci.org/3rd-Eden/extract-github.png)](https://travis-ci.org/3rd-Eden/extract-github)

Extract a valid github URL from a given object. We make the assumption that the
given object follows a `package.json` format as used by npm.

## Installation

This module is released in the npm registry as `extract-github` and can therefor
be installed using:

```
npm install --save extract-github
```

## Usage

This module was written to only do specific task and do that task well, and that
is extracting github information. We therefor export as a single function:

```js
'use strict';

var extract = require('extract-github');
```

Once you've required the module you can feed it the contents of a package.json
to extract to github information.

```js
var github = extract(require('./package.json'));
```

The `github` variable should now contain an object with a `user` and `repo`
property which can be re-used to create a new github URL. In addition to parsing
package.json's it also supports extracting github information out of `README` it
can do this by extracting Travis-CI badges or just plain ol matching github URL
from the content.

```js
var github = extract(require('fs').readFileSync(__dirname +'/README.md'));
```

## License

MIT

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