mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
refactor: use Array.includes (#1596)
This commit is contained in:
parent
19281f86f9
commit
05c9d0507c
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ export function validateName(name: string): boolean {
|
|||
return !(
|
||||
!normalizedName.match(/^[-a-zA-Z0-9_.!~*'()@]+$/) ||
|
||||
normalizedName.startsWith('.') || // ".bin", etc.
|
||||
['node_modules', '__proto__', 'favicon.ico'].indexOf(normalizedName) !== -1
|
||||
['node_modules', '__proto__', 'favicon.ico'].includes(normalizedName)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue