From 05c9d0507c3151ae122a78b4e47907c33a5845fa Mon Sep 17 00:00:00 2001 From: James George Date: Sat, 7 Dec 2019 12:14:11 +0530 Subject: [PATCH] refactor: use Array.includes (#1596) --- src/lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 179c2ec84..db05ebd3b 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -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) ); }