Skip to content

Commit

Permalink
Merge branch 'next' into refactor-IND-locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Oct 14, 2022
2 parents a446b48 + b99ff71 commit 4173eef
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/modules/company/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,10 @@ export class CompanyModule {
* @since 7.4.0
*/
name(): string {
// ToDo: This `staticFormats` pattern should be removed in the future. It is only used to maintain backwards compatibility.
const staticFormats = [
'{{name.lastName}} {{company.companySuffix}}',
'{{name.lastName}} - {{name.lastName}}',
'{{name.lastName}}, {{name.lastName}} and {{name.lastName}}',
];
const formats =
this.faker.definitions.company.name_patterns ?? staticFormats;
const pattern = this.faker.helpers.arrayElement(
this.faker.definitions.company.name_patterns
);

const pattern = this.faker.helpers.arrayElement(formats);
return this.faker.helpers.fake(pattern);
}

Expand Down

0 comments on commit 4173eef

Please sign in to comment.