https://github.com/pnpm/parse-npm-tarball-url
Parse a tarball URL hosted in the npm registry
https://github.com/pnpm/parse-npm-tarball-url
npm registry
Last synced: 2 months ago
JSON representation
Parse a tarball URL hosted in the npm registry
- Host: GitHub
- URL: https://github.com/pnpm/parse-npm-tarball-url
- Owner: pnpm
- License: mit
- Created: 2017-02-13T21:33:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T16:42:43.000Z (about 4 years ago)
- Last Synced: 2025-04-10T02:31:01.618Z (3 months ago)
- Topics: npm, registry
- Language: TypeScript
- Homepage:
- Size: 135 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# parse-npm-tarball-url
[](https://travis-ci.org/pnpm/parse-npm-tarball-url)
> Parse a tarball URL hosted in the npm registry
## Installation
```
add parse-npm-tarball-url
```## Usage
```js
import parseNpmTarbalUrl from 'parse-npm-tarball-url'const pkg = parseNpmTarbalUrl('http://registry.npmjs.org/foo/-/foo-1.0.0.tgz')
console.log(pkg)
// {
// host: 'registry.npmjs.org',
// name: 'foo',
// version: '1.0.0'
// }
```## Related
- [get-npm-tarball-url](https://github.com/pnpm/get-npm-tarball-url) - Create the tarball URL of a npm package
## License
[MIT](LICENSE) © [Zoltan Kochan](https://www.kochan.io)