parse-package-name
v1.0.0
Published
Parse npm package name into name, version and path
Downloads
962,870
Readme
💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.
parse-package-name
Install
npm i parse-package-name
Usage
import { parse } from 'parse-package-name'
parse('@egoist/[email protected]/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
License
MIT © EGOIST