From 69c006344b8c54a9cd5f0adc36d49c88a223de4e Mon Sep 17 00:00:00 2001 From: Juliette <85245254+julsql@users.noreply.github.com> Date: Sat, 21 Dec 2024 13:05:42 +0100 Subject: [PATCH 1/2] fix(finance): update Discover card number format to ensure accuracy (#3336) Co-authored-by: ST-DDT --- src/locales/el/finance/credit_card/discover.ts | 3 --- src/locales/en/finance/credit_card/discover.ts | 3 --- test/modules/__snapshots__/finance.spec.ts.snap | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/locales/el/finance/credit_card/discover.ts b/src/locales/el/finance/credit_card/discover.ts index 7a719ee01df..1010fae7e49 100644 --- a/src/locales/el/finance/credit_card/discover.ts +++ b/src/locales/el/finance/credit_card/discover.ts @@ -1,8 +1,5 @@ export default [ '/6011-####-####-###L/', - '/6011-62##-####-####-###L/', '/64[4-9]#-####-####-###L/', - '/64[4-9]#-62##-####-####-###L/', '/65##-####-####-###L/', - '/65##-62##-####-####-###L/', ]; diff --git a/src/locales/en/finance/credit_card/discover.ts b/src/locales/en/finance/credit_card/discover.ts index 462c3f43bcc..d2b3ac18dbb 100644 --- a/src/locales/en/finance/credit_card/discover.ts +++ b/src/locales/en/finance/credit_card/discover.ts @@ -1,8 +1,5 @@ export default [ '6011-####-####-###L', - '6011-62##-####-####-###L', '64[4-9]#-####-####-###L', - '64[4-9]#-62##-####-####-###L', '65##-####-####-###L', - '65##-62##-####-####-###L', ]; diff --git a/test/modules/__snapshots__/finance.spec.ts.snap b/test/modules/__snapshots__/finance.spec.ts.snap index 7d1a1f4cb2b..7d65732251a 100644 --- a/test/modules/__snapshots__/finance.spec.ts.snap +++ b/test/modules/__snapshots__/finance.spec.ts.snap @@ -34,7 +34,7 @@ exports[`finance > 42 > creditCardCVV 1`] = `"397"`; exports[`finance > 42 > creditCardIssuer 1`] = `"discover"`; -exports[`finance > 42 > creditCardNumber > noArgs 1`] = `"6575-6211-0867-0982-1139"`; +exports[`finance > 42 > creditCardNumber > noArgs 1`] = `"6575-1108-6709-8211"`; exports[`finance > 42 > creditCardNumber > with issuer 1`] = `"4975110867099"`; From 1fd69d9822a6f510048063297c57c1d8ae90f14e Mon Sep 17 00:00:00 2001 From: Matt Mayer <152770+matthewmayer@users.noreply.github.com> Date: Sat, 21 Dec 2024 19:06:34 +0700 Subject: [PATCH 2/2] docs: improve examples for objectKey,objectValue,objectEntry (#3339) * docs: improve examples for objectKey,objectValue,objectEntry * Update index.ts Co-authored-by: DivisionByZero * Update index.ts Co-authored-by: Shinigami --------- Co-authored-by: DivisionByZero Co-authored-by: Shinigami --- src/modules/helpers/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index 375e820ca8a..473927c3e69 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 */