diff options
| author | ST-DDT <[email protected]> | 2024-06-21 11:49:51 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-21 09:49:51 +0000 |
| commit | d31c635e6efc4013ea44a6676f832091c1763050 (patch) | |
| tree | b648d4ab8b9d8e16f18cfd7b5c01c8fd89d90ffd /src | |
| parent | d6924f7fbb9403d106022f58a1bda3b159e88ae6 (diff) | |
| download | faker-d31c635e6efc4013ea44a6676f832091c1763050.tar.xz faker-d31c635e6efc4013ea44a6676f832091c1763050.zip | |
chore: remove arrayElement(s) js only error (#2958)
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/helpers/index.ts | 14 |
1 files changed, 0 insertions, 14 deletions
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<const T>(array: ReadonlyArray<T>): 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 []; } |
