Skip to content

Commit

Permalink
Merge branch 'main' into deprecate/address/street/prefix-suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Jul 30, 2022
2 parents 81de721 + aedd7b8 commit db356d0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/modules/company/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Company {
/**
* Generates a random company name.
*
* @param format The optional format index used to select a format.
* @param format The optional format index used to select a format. Deprecated, do not use.
*
* @example
* faker.company.name() // 'Zieme, Hauck and McClure'
Expand All @@ -41,6 +41,15 @@ export class Company {
'{{name.lastName}}, {{name.lastName}} and {{name.lastName}}',
];

if (format != null) {
deprecated({
deprecated: 'faker.company.name(format)',
proposed: 'faker.company.name()',
since: '7.4',
until: '8.0',
});
}

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

0 comments on commit db356d0

Please sign in to comment.