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(company): move name formats to locales #1293

Merged
merged 7 commits into from Aug 22, 2022
3 changes: 1 addition & 2 deletions src/modules/company/index.ts
Expand Up @@ -50,8 +50,7 @@ export class Company {
'{{name.lastName}} - {{name.lastName}}',
'{{name.lastName}}, {{name.lastName}} and {{name.lastName}}',
];
const localeFormats = this.faker.definitions.company.name_patterns;
const formats = localeFormats ? localeFormats : staticFormats;
const formats = this.faker.definitions.company.name_patterns ?? staticFormats;
Minozzzi marked this conversation as resolved.
Show resolved Hide resolved

if (typeof format !== 'number') {
format = this.faker.datatype.number(formats.length - 1);
Expand Down