# github-from-package

> return the github url from a package.json file

Latest version **0.0.0** (published 2012-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install github-from-package
pnpm add github-from-package
yarn add github-from-package
bun add github-from-package
```

## Health

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

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

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2012-12-29 |
| First published | 2012-12-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/github-from-package) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Halliday |
| Maintainers | substack |
| Keywords | github, package.json, npm, repository |

## Links

- npm: https://www.npmjs.com/package/github-from-package
- Repository: https://github.com/substack/github-from-package
- npm.io page: https://npm.io/package/github-from-package

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.0 (latest) — 2012-12-29

## README

# github-from-package

return the github url from a package.json file

[![build status](https://secure.travis-ci.org/substack/github-from-package.png)](http://travis-ci.org/substack/github-from-package)

# example

For the `./package.json` file:

``` json
{
  "name": "beep-boop",
  "version": "1.2.3",
  "repository" : {
    "type" : "git",
    "url": "git@github.com:substack/beep-boop.git"
  }
}
```

``` js
var github = require('github-from-package');
var url = github(require('./package.json'));
console.log(url);
```

```
https://github.com/substack/beep-boop
```

# methods

``` js
var github = require('github-from-package')
```

## var url = github(pkg)

Return the most likely github url from the package.json contents `pkg`. If no
github url can be determined, return `undefined`.

# install

With [npm](https://npmjs.org) do:

```
npm install github-from-package
```

# license

MIT

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