# get-pkg

> Get the package.json for a project from npm.

Latest version **2.0.0** (published 2023-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-pkg
pnpm add get-pkg
yarn add get-pkg
bun add get-pkg
```

## 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 | 2023-07-24 |
| First published | 2015-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 2 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert, doowb |
| Keywords | get, json, module, npm, object, package, package.json, pkg, pkgs |

## Links

- npm: https://www.npmjs.com/package/get-pkg
- Repository: https://github.com/jonschlinkert/get-pkg
- Issues: https://github.com/jonschlinkert/get-pkg/issues
- npm.io page: https://npm.io/package/get-pkg

## Dependencies (2)

- [node-fetch](https://npm.io/package/node-fetch.md) ^3.3.1
- [parse-package-name](https://npm.io/package/parse-package-name.md) ^1.0.0

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

- 2.0.0 (latest) — 2023-07-24
- 1.1.0 — 2018-12-08
- 1.0.1 — 2018-05-30
- 1.0.0 — 2018-05-28
- 0.3.0 — 2016-04-11
- 0.2.1 — 2016-03-02
- 0.2.0 — 2015-12-11
- 0.1.0 — 2015-11-22

## README

# get-pkg [![NPM version](https://img.shields.io/npm/v/get-pkg.svg?style=flat)](https://www.npmjs.com/package/get-pkg) [![NPM monthly downloads](https://img.shields.io/npm/dm/get-pkg.svg?style=flat)](https://npmjs.org/package/get-pkg) [![NPM total downloads](https://img.shields.io/npm/dt/get-pkg.svg?style=flat)](https://npmjs.org/package/get-pkg)

> Get the package.json for a project from npm.

Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.

## Install

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

```sh
$ npm install --save get-pkg
```

Also see [get-pkgs](https://github.com/jonschlinkert/get-pkgs), if you need to get more than one `package.json`.

## Usage

```js
const getPkg = require('get-pkg');
const data = await getPkg('generate')

console.log(data);
//=> { name: 'generate', ... }
```

## About

<details>
<summary><strong>Contributing</strong></summary>

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

</details>

<details>
<summary><strong>Running Tests</strong></summary>

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

```sh
$ npm install && npm test
```

</details>

<details>
<summary><strong>Building docs</strong></summary>

_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_

To generate the readme, run the following command:

```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```

</details>

### Related projects

You might also be interested in these projects:

* [get-pkgs](https://www.npmjs.com/package/get-pkgs): Get the package.json for an array of repos from the npm registry, optionally filtering properties… [more](https://github.com/jonschlinkert/get-pkgs) | [homepage](https://github.com/jonschlinkert/get-pkgs "Get the package.json for an array of repos from the npm registry, optionally filtering properties using glob patterns.")
* [github-base](https://www.npmjs.com/package/github-base): Low-level methods for working with the GitHub API in node.js/JavaScript. | [homepage](https://github.com/jonschlinkert/github-base "Low-level methods for working with the GitHub API in node.js/JavaScript.")

### Contributors

| **Commits** | **Contributor** |
| --- | --- |
| 21 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2  | [doowb](https://github.com/doowb) |
| 1  | [joakimbeng](https://github.com/joakimbeng) |

### Author

**Jon Schlinkert**

* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)

### License

Copyright © 2023, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on July 24, 2023._

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