Licence
ISC
Version
2.0.0
Deps
1
Size
6 kB
Vulns
0
Weekly
0
parse-user-repo
Parse a username/repo string
Installation
npm install parse-user-repo
API
import parseUserRepo from 'parse-user-repo';
parseUserRepo(str)
str: string (user/repo style repository identifier, for example https://github.com/holman/spark → 'holman/spark')
Return: Object ({username: ..., repo: ...})
It extracts a username and a repository name from a user/repo string and creates an Object.
parseUserRepo('gohugoio/hugo'); //=> {username: 'gohugoio', repo: 'hugo'}
License
ISC License 2018 Shinnosuke Watanabe