From d31c635e6efc4013ea44a6676f832091c1763050 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Fri, 21 Jun 2024 11:49:51 +0200 Subject: chore: remove arrayElement(s) js only error (#2958) --- src/modules/helpers/index.ts | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/modules') diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index f62d9086..69a9995c 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -844,13 +844,6 @@ export class SimpleHelpersModule extends SimpleModuleBase { * @since 6.3.0 */ arrayElement(array: ReadonlyArray): T { - // TODO @xDivisionByZerox 2023-04-20: Remove in v9 - if (array == null) { - throw new FakerError( - 'Calling `faker.helpers.arrayElement()` without arguments is no longer supported.' - ); - } - if (array.length === 0) { throw new FakerError('Cannot get value from empty dataset.'); } @@ -954,13 +947,6 @@ export class SimpleHelpersModule extends SimpleModuleBase { max: number; } ): T[] { - // TODO @xDivisionByZerox 2023-04-20: Remove in v9 - if (array == null) { - throw new FakerError( - 'Calling `faker.helpers.arrayElements()` without arguments is no longer supported.' - ); - } - if (array.length === 0) { return []; } -- cgit v1.2.3