yarn2nix: improve naming regexes
Originally submitted in https://github.com/nix-community/yarn2nix/pull/128
This commit is contained in:
parent
6e687b6325
commit
23d75e6be0
1 changed files with 2 additions and 2 deletions
|
@ -22,8 +22,8 @@ function urlToName(url) {
|
|||
}
|
||||
|
||||
return url
|
||||
.replace('https://registry.yarnpkg.com/', '') // prevents having long directory names
|
||||
.replace(/[@/:-]/g, '_') // replace @ and : and - characters with underscore
|
||||
.replace(/https:\/\/(.)*(.com)\//g, '') // prevents having long directory names
|
||||
.replace(/[@/%:-]/g, '_') // replace @ and : and - and % characters with underscore
|
||||
}
|
||||
|
||||
module.exports = urlToName
|
||||
|
|
Loading…
Reference in a new issue