From 3fbe50edbbcc231b207e20d7c37aac5b123ac778 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Thu, 23 Nov 2023 20:10:07 +0100 Subject: [PATCH 1/2] chore(helpers): fix examples on internal function --- src/modules/helpers/index.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index aaf0e231a0b..91ef54d90bf 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 */ @@ -82,15 +82,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 */ From f83fb954edb1f3f99cf22176b9e0ff64e06339a8 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sat, 25 Nov 2023 12:30:07 +0100 Subject: [PATCH 2/2] chore: apply suggestion from other PR --- src/modules/helpers/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 91ef54d90bf..41106655fb6 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -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.