From 350dfbf2c57f023a78567da60bf4792ebd1a41f7 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Mon, 9 Oct 2023 20:22:43 +0200 Subject: infra(unicorn): no-array-push-push (#2454) --- src/modules/helpers/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 3cc9e855..59a4041a 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -463,8 +463,10 @@ export class SimpleHelpersModule { if (range[0].indexOf('-') === -1) { // handle non-ranges if (isCaseInsensitive && isNaN(Number(range[0]))) { - rangeCodes.push(range[0].toUpperCase().charCodeAt(0)); - rangeCodes.push(range[0].toLowerCase().charCodeAt(0)); + rangeCodes.push( + range[0].toUpperCase().charCodeAt(0), + range[0].toLowerCase().charCodeAt(0) + ); } else { rangeCodes.push(range[0].charCodeAt(0)); } @@ -481,8 +483,10 @@ export class SimpleHelpersModule { for (let i = min; i <= max; i++) { if (isCaseInsensitive && isNaN(Number(String.fromCharCode(i)))) { const ch = String.fromCharCode(i); - rangeCodes.push(ch.toUpperCase().charCodeAt(0)); - rangeCodes.push(ch.toLowerCase().charCodeAt(0)); + rangeCodes.push( + ch.toUpperCase().charCodeAt(0), + ch.toLowerCase().charCodeAt(0) + ); } else { rangeCodes.push(i); } -- cgit v1.2.3