# parse-package-name

> Parse npm package name into name, version and path

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

## Install

```sh
npm install parse-package-name
pnpm add parse-package-name
yarn add parse-package-name
bun add parse-package-name
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-11-18 |
| First published | 2016-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | egoist, rem |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2021-11-18
- 0.1.0 — 2016-12-23

## README

**💛 You can help the author become a full-time open-source maintainer by [sponsoring him on GitHub](https://github.com/sponsors/egoist).**

---

# parse-package-name

[![npm version](https://badgen.net/npm/v/parse-package-name)](https://npm.im/parse-package-name) [![npm downloads](https://badgen.net/npm/dm/parse-package-name)](https://npm.im/parse-package-name)

## Install

```bash
npm i parse-package-name
```

## Usage

```ts
import { parse } from 'parse-package-name'

parse('@egoist/foo@1.0.0/bar.js')
//=>
// {name:'@egoist/foo', version:'1.0.0', path:'bar.js'}
```

`version` defaults to `latest` if not specified, `path` defaults to an empty string if not specified.

## Sponsors

[![sponsors](https://sponsors-images.egoist.sh/sponsors.svg)](https://github.com/sponsors/egoist)

## License

MIT &copy; [EGOIST](https://github.com/sponsors/egoist)

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