aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDamien Retzinger <[email protected]>2022-01-21 13:19:54 -0500
committerGitHub <[email protected]>2022-01-21 19:19:54 +0100
commit51a95d8db5bf18edc183040b03c84310a1710455 (patch)
tree9afeae16c6eeb3fb842d15d1d686a60ee27d55db /src
parent93e8e535ba5bf85fae029078941523ce566fb356 (diff)
downloadfaker-51a95d8db5bf18edc183040b03c84310a1710455.tar.xz
faker-51a95d8db5bf18edc183040b03c84310a1710455.zip
chore: delete old examples and doc folder (#155)
Co-authored-by: Shinigami92 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/helpers.ts4
-rw-r--r--src/random.ts4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/helpers.ts b/src/helpers.ts
index c3a849d6..a8137800 100644
--- a/src/helpers.ts
+++ b/src/helpers.ts
@@ -17,7 +17,9 @@ export class Helpers {
* @method faker.helpers.randomize
* @param array
*/
- randomize<T = string>(array: ReadonlyArray<T> = ['a', 'b', 'c'] as unknown as ReadonlyArray<T>): T {
+ randomize<T = string>(
+ array: ReadonlyArray<T> = ['a', 'b', 'c'] as unknown as ReadonlyArray<T>
+ ): T {
return this.faker.random.arrayElement(array);
}
diff --git a/src/random.ts b/src/random.ts
index 8414134a..46a6fdba 100644
--- a/src/random.ts
+++ b/src/random.ts
@@ -72,7 +72,9 @@ export class Random {
* @method faker.random.arrayElement
* @param array
*/
- arrayElement<T = string>(array: ReadonlyArray<T> = ['a', 'b', 'c'] as unknown as ReadonlyArray<T>): T {
+ arrayElement<T = string>(
+ array: ReadonlyArray<T> = ['a', 'b', 'c'] as unknown as ReadonlyArray<T>
+ ): T {
const r = this.faker.datatype.number({ max: array.length - 1 });
return array[r];
}