diff options
| author | ST-DDT <[email protected]> | 2023-12-01 18:19:40 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-01 17:19:40 +0000 |
| commit | 9dd57d742d736de0a5cf75aa8ef1ebb2460afd19 (patch) | |
| tree | 06e17b080a9f5842d31f89b38c7b7816aed463a6 | |
| parent | 2eca5bc06c5f53efe9fe495577cd930620453794 (diff) | |
| download | faker-9dd57d742d736de0a5cf75aa8ef1ebb2460afd19.tar.xz faker-9dd57d742d736de0a5cf75aa8ef1ebb2460afd19.zip | |
chore(helpers): fix examples on internal functions (#2559)
| -rw-r--r-- | src/modules/helpers/index.ts | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 9a681da9..26de107d 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -9,7 +9,7 @@ import * as uniqueExec from './unique'; /** * Returns a number based on given RegEx-based quantifier symbol or quantifier values. * - * @param faker Faker instance + * @param faker The Faker instance to use. * @param quantifierSymbol Quantifier symbols can be either of these: `?`, `*`, `+`. * @param quantifierMin Quantifier minimum value. If given without a maximum, this will be used as the quantifier value. * @param quantifierMax Quantifier maximum value. Will randomly get a value between the minimum and maximum if both are provided. @@ -17,9 +17,9 @@ import * as uniqueExec from './unique'; * @returns a random number based on the given quantifier parameters. * * @example - * getRepetitionsBasedOnQuantifierParameters(this.faker, '*', null, null) // 3 - * getRepetitionsBasedOnQuantifierParameters(this.faker, null, 10, null) // 10 - * getRepetitionsBasedOnQuantifierParameters(this.faker, null, 5, 8) // 6 + * getRepetitionsBasedOnQuantifierParameters(faker, '*', null, null) // 3 + * getRepetitionsBasedOnQuantifierParameters(faker, null, 10, null) // 10 + * getRepetitionsBasedOnQuantifierParameters(faker, null, 5, 8) // 6 * * @since 8.0.0 */ @@ -73,7 +73,9 @@ function getRepetitionsBasedOnQuantifierParameters( } /** - * Replaces the regex like expressions in the given string with matching values. Note: This method will be removed in v9. + * Replaces the regex like expressions in the given string with matching values. + * + * Note: This method will be removed in v9. * * Supported patterns: * - `.{times}` => Repeat the character exactly `times` times. @@ -82,15 +84,15 @@ function getRepetitionsBasedOnQuantifierParameters( * * @internal * - * @param faker A Faker instance. + * @param faker The Faker instance to use. * @param string The template string to parse. * * @example - * faker.helpers.legacyRegexpStringParse() // '' - * faker.helpers.legacyRegexpStringParse('#{5}') // '#####' - * faker.helpers.legacyRegexpStringParse('#{2,9}') // '#######' - * faker.helpers.legacyRegexpStringParse('[500-15000]') // '8375' - * faker.helpers.legacyRegexpStringParse('#{3}test[1-5]') // '###test3' + * legacyRegexpStringParse(faker) // '' + * legacyRegexpStringParse(faker, '#{5}') // '#####' + * legacyRegexpStringParse(faker, '#{2,9}') // '#######' + * legacyRegexpStringParse(faker, '[500-15000]') // '8375' + * legacyRegexpStringParse(faker, '#{3}test[1-5]') // '###test3' * * @since 5.0.0 */ |
