mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
better regex
This commit is contained in:
parent
e512839341
commit
d12a6fdb1e
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ import { URL } from 'url';
|
|||
* @returns {String}
|
||||
*/
|
||||
export function getVersionFromTarball(fileName: string): string | void {
|
||||
const groups = fileName.match(/.+-(\d+\.\d+\.\d+.+)\.tgz$/);
|
||||
const groups = fileName.match(/^.+-(\d+\.\d+\.\d+.+)\.tgz$/);
|
||||
|
||||
return groups !== null ? groups[1] : undefined;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue