Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add creditCardIssuer #888

Merged
merged 9 commits into from
Apr 30, 2022
13 changes: 13 additions & 0 deletions src/finance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,19 @@ export class Finance {
return cvv;
}

/**
* Returns a random credit card provider
ST-DDT marked this conversation as resolved.
Show resolved Hide resolved
*
* @example
* faker.finance.creditCardProvider() // 'discover'
*/
creditCardProvider(): string {
Shinigami92 marked this conversation as resolved.
Show resolved Hide resolved
return this.faker.random.objectElement(
this.faker.definitions.finance.credit_card,
'key'
);
}

/**
* Generates a random PIN number.
*
Expand Down