Skip to content

Commit

Permalink
docs: improve examples for objectKey,objectValue,objectEntry (#3339)
Browse files Browse the repository at this point in the history
* docs: improve examples for objectKey,objectValue,objectEntry

* Update index.ts

Co-authored-by: DivisionByZero <leyla.jaehnig@gmx.de>

* Update index.ts

Co-authored-by: Shinigami <chrissi92@hotmail.de>

---------

Co-authored-by: DivisionByZero <leyla.jaehnig@gmx.de>
Co-authored-by: Shinigami <chrissi92@hotmail.de>
  • Loading branch information
3 people authored Dec 21, 2024
1 parent 69c0063 commit 1fd69d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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
*/
Expand All @@ -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.
*
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand Down

0 comments on commit 1fd69d9

Please sign in to comment.