aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2024-12-21 19:06:34 +0700
committerGitHub <[email protected]>2024-12-21 12:06:34 +0000
commit1fd69d9822a6f510048063297c57c1d8ae90f14e (patch)
tree2f8d2712f3d259618851aa843538284a7767f5ed /src
parent69c006344b8c54a9cd5f0adc36d49c88a223de4e (diff)
downloadfaker-1fd69d9822a6f510048063297c57c1d8ae90f14e.tar.xz
faker-1fd69d9822a6f510048063297c57c1d8ae90f14e.zip
docs: improve examples for objectKey,objectValue,objectEntry (#3339)
* docs: improve examples for objectKey,objectValue,objectEntry * Update index.ts Co-authored-by: DivisionByZero <[email protected]> * Update index.ts Co-authored-by: Shinigami <[email protected]> --------- Co-authored-by: DivisionByZero <[email protected]> Co-authored-by: Shinigami <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/modules/helpers/index.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts
index 375e820c..473927c3 100644
--- a/src/modules/helpers/index.ts
+++ b/src/modules/helpers/index.ts
@@ -771,7 +771,7 @@ export class SimpleHelpersModule extends SimpleModuleBase {
}
/**
- * Returns a random key from given object.
+ * Returns a random key from the given object.
*
* @template T The type of the object to select from.
*
@@ -780,7 +780,7 @@ export class SimpleHelpersModule extends SimpleModuleBase {
* @throws If the given object is empty.
*
* @example
- * faker.helpers.objectKey({ myProperty: 'myValue' }) // 'myProperty'
+ * faker.helpers.objectKey({ Cheetah: 120, Falcon: 390, Snail: 0.03 }) // 'Falcon'
*
* @since 6.3.0
*/
@@ -790,7 +790,7 @@ export class SimpleHelpersModule extends SimpleModuleBase {
}
/**
- * Returns a random value from given object.
+ * Returns a random value from the given object.
*
* @template T The type of object to select from.
*
@@ -799,7 +799,7 @@ export class SimpleHelpersModule extends SimpleModuleBase {
* @throws If the given object is empty.
*
* @example
- * faker.helpers.objectValue({ myProperty: 'myValue' }) // 'myValue'
+ * faker.helpers.objectValue({ Cheetah: 120, Falcon: 390, Snail: 0.03 }) // 390
*
* @since 6.3.0
*/
@@ -818,7 +818,7 @@ export class SimpleHelpersModule extends SimpleModuleBase {
* @throws If the given object is empty.
*
* @example
- * faker.helpers.objectEntry({ prop1: 'value1', prop2: 'value2' }) // ['prop1', 'value1']
+ * faker.helpers.objectEntry({ Cheetah: 120, Falcon: 390, Snail: 0.03 }) // ['Snail', 0.03]
*
* @since 8.0.0
*/