diff options
| author | ST-DDT <[email protected]> | 2024-02-19 20:32:33 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-19 20:32:33 +0100 |
| commit | 25f2a0326b1103c8a47a06156d43d71d2d72b7fa (patch) | |
| tree | ee5e7939a56a187f063d02998334706a1a5aa5e3 /src | |
| parent | accf42c636b7ecea220676b7bc5dd2822bc97ed2 (diff) | |
| download | faker-25f2a0326b1103c8a47a06156d43d71d2d72b7fa.tar.xz faker-25f2a0326b1103c8a47a06156d43d71d2d72b7fa.zip | |
docs: more jsdoc fixes (#2668)
Diffstat (limited to 'src')
| -rw-r--r-- | src/faker.ts | 3 | ||||
| -rw-r--r-- | src/modules/finance/index.ts | 6 | ||||
| -rw-r--r-- | src/modules/helpers/index.ts | 2 | ||||
| -rw-r--r-- | src/modules/internet/index.ts | 10 | ||||
| -rw-r--r-- | src/modules/location/index.ts | 6 | ||||
| -rw-r--r-- | src/randomizer.ts | 2 | ||||
| -rw-r--r-- | src/utils/merge-locales.ts | 2 |
7 files changed, 18 insertions, 13 deletions
diff --git a/src/faker.ts b/src/faker.ts index d4835067..ff54e2f3 100644 --- a/src/faker.ts +++ b/src/faker.ts @@ -178,6 +178,9 @@ export class Faker extends SimpleFaker { * @param options.localeFallback The name of the fallback locale to use. * * @example + * import { Faker, allLocales } from '@faker-js/faker'; + * // const { Faker, allLocales } = require('@faker-js/faker'); + * * new Faker({ locales: allLocales }); * * @since 6.0.0 diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts index 4013f99f..335bac97 100644 --- a/src/modules/finance/index.ts +++ b/src/modules/finance/index.ts @@ -759,8 +759,8 @@ export class FinanceModule extends ModuleBase { /** * Generates a random credit card number. * - * @param options An options object. Defaults to `''`. - * @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. + * @param options An options object. + * @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. Defaults to `''`. * * @example * faker.finance.creditCardNumber() // '4427163488662' @@ -781,7 +781,7 @@ export class FinanceModule extends ModuleBase { * Generates a random credit card number. * * @param options An options object, the issuer or a custom format. - * @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. + * @param options.issuer The name of the issuer (case-insensitive) or the format used to generate one. Defaults to `''`. * * @example * faker.finance.creditCardNumber() // '4427163488662' diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index bd905740..36f050e8 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -1343,7 +1343,7 @@ export class HelpersModule extends SimpleHelpersModule { * faker.helpers.fake('{{person.lastName}}, {{person.firstName}} {{person.suffix}}') // 'Durgan, Noe MD' * faker.helpers.fake('This is static test.') // 'This is static test.' * faker.helpers.fake('Good Morning {{person.firstName}}!') // 'Good Morning Estelle!' - * faker.helpers.fake('You can call me at {{phone.number(!## ### #####!)}}.') // 'You can call me at 202 555 973722.' + * faker.helpers.fake('You can visit me at {{location.streetAddress(true)}}.') // 'You can visit me at 3393 Ronny Way Apt. 742.' * faker.helpers.fake('I flipped the coin and got: {{helpers.arrayElement(["heads", "tails"])}}') // 'I flipped the coin and got: tails' * faker.helpers.fake('Your PIN number is: {{string.numeric(4, {"exclude": ["0"]})}}') // 'Your PIN number is: 4834' * diff --git a/src/modules/internet/index.ts b/src/modules/internet/index.ts index 86b03098..df860169 100644 --- a/src/modules/internet/index.ts +++ b/src/modules/internet/index.ts @@ -701,11 +701,11 @@ export class InternetModule extends ModuleBase { * * @example * faker.internet.displayName() // 'Nettie_Zboncak40' - * faker.internet.displayName({ firstname 'Jeanne', lastName: 'Doe' }) // 'Jeanne98' - note surname not used. - * faker.internet.displayName({ firstname 'John', lastName: 'Doe' }) // 'John.Doe' - * faker.internet.displayName({ firstname 'Hélene', lastName: 'Müller' }) // 'Hélene_Müller11' - * faker.internet.displayName({ firstname 'Фёдор', lastName: 'Достоевский' }) // 'Фёдор.Достоевский50' - * faker.internet.displayName({ firstname '大羽', lastName: '陳' }) // '大羽.陳' + * faker.internet.displayName({ firstName: 'Jeanne', lastName: 'Doe' }) // 'Jeanne98' - note surname not used. + * faker.internet.displayName({ firstName: 'John', lastName: 'Doe' }) // 'John.Doe' + * faker.internet.displayName({ firstName: 'Hélene', lastName: 'Müller' }) // 'Hélene_Müller11' + * faker.internet.displayName({ firstName: 'Фёдор', lastName: 'Достоевский' }) // 'Фёдор.Достоевский50' + * faker.internet.displayName({ firstName: '大羽', lastName: '陳' }) // '大羽.陳' * * @since 8.0.0 */ diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts index 54766d8a..fee40fd2 100644 --- a/src/modules/location/index.ts +++ b/src/modules/location/index.ts @@ -629,9 +629,9 @@ export class LocationModule extends ModuleBase { * * @example * faker.location.longitude() // -30.9501 - * faker.location.longitude({ max: 10 }) // 5.7225 - * faker.location.longitude({ max: 10, min: -10 }) // -9.6273 - * faker.location.longitude({ max: 10, min: -10, precision: 5 }) // 2.68452 + * faker.location.longitude(10) // 5.7225 + * faker.location.longitude(10, -10) // -9.6273 + * faker.location.longitude(10, -10, 5) // 2.68452 * * @since 8.0.0 * diff --git a/src/randomizer.ts b/src/randomizer.ts index d2c6892b..a0bc14bf 100644 --- a/src/randomizer.ts +++ b/src/randomizer.ts @@ -9,7 +9,7 @@ * Instances are expected to be ready for use before being passed to any Faker constructor, * this includes being `seed()`ed with either a random or fixed value. * - * For more information please refer to the [documentation](/api/randomizer). + * For more information please refer to the [documentation](https://fakerjs.dev/api/randomizer.html). * * @example * import { Faker, Randomizer, SimpleFaker } from '@faker-js/faker'; diff --git a/src/utils/merge-locales.ts b/src/utils/merge-locales.ts index fd47923a..17683a3a 100644 --- a/src/utils/merge-locales.ts +++ b/src/utils/merge-locales.ts @@ -11,6 +11,8 @@ import type { LocaleDefinition } from '..'; * @returns The newly merged locale. * * @example + * import { de_CH, de, en, mergeLocales } from '@faker-js/faker'; + * * const de_CH_with_fallbacks = mergeLocales([ de_CH, de, en ]); * * @since 8.0.0 |
