# package-fetcher

> Get information about an NPM package directly from the registry.

Latest version **1.3.0** (published 2024-05-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install package-fetcher
pnpm add package-fetcher
yarn add package-fetcher
bun add package-fetcher
```

## 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.3.0 |
| Published | 2024-05-02 |
| First published | 2023-08-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | oxta. |
| Maintainers | oxta. |
| Keywords | info, npm, package.json, package, version, author |

## Links

- npm: https://www.npmjs.com/package/package-fetcher
- npm.io page: https://npm.io/package/package-fetcher

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.6.8

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

- 1.3.0 (latest) — 2024-05-02
- 1.2.6 — 2023-11-21
- 1.2.5 — 2023-11-21
- 1.2.4 — 2023-11-21
- 1.1.0 — 2023-08-07
- 1.0.1 — 2023-08-06
- 1.0.0 — 2023-08-06

## README

# package-fetcher

Get information about a NPM package directly from the registry

+ **[Installation](#installation)**
+ **[Functions](#functions)**

## Installation

```bash
npm install package-fetcher@latest
```

## Example

```js
const package = require('package-fetcher');
package.get('moment').then(info => {
  console.log(info.name, info.description)
}).catch(error => {
  console.log('An error ocurred!', error)
});
```

## Functions

+ **get(`package name`)** - Get information about the latest version of a package

+ **getDependencies(`package name`)** - Get the dependencies (or dev dependencies) of a NPM package

+ **search(`search term, limit?`)** - Get different NPM packages by searching for keywords in the registry. If you don't specify a limit, it will return the default number of results (20)

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