diff options
| author | Leyla Jähnig <[email protected]> | 2022-03-21 13:48:44 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-21 12:48:44 +0000 |
| commit | 5a15c40ec98fc1d39309d875899b88a0b7684bcf (patch) | |
| tree | 0585c10a972a3aca56bea577dc29dcf449c2c7a9 /src | |
| parent | 1327b23e566af3845381b75d500f3afa9b1fa7fb (diff) | |
| download | faker-5a15c40ec98fc1d39309d875899b88a0b7684bcf.tar.xz faker-5a15c40ec98fc1d39309d875899b88a0b7684bcf.zip | |
docs: deprecate randomize (#506)
Diffstat (limited to 'src')
| -rw-r--r-- | src/helpers.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/helpers.ts b/src/helpers.ts index c40fb720..ddf19ed9 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -137,11 +137,15 @@ export class Helpers { * @example * faker.helpers.randomize() // 'c' * faker.helpers.randomize([1, 2, 3]) // '2' + * + * @deprecated */ - // TODO ST-DDT 2022-02-06: Mark as deprecated randomize<T = string>( array: ReadonlyArray<T> = ['a', 'b', 'c'] as unknown as ReadonlyArray<T> ): T { + console.warn( + 'Deprecation Warning: faker.helpers.randomize is now located in faker.random.arrayElement' + ); return this.faker.random.arrayElement(array); } |
