aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGuilherme Minozzi <[email protected]>2022-07-30 15:10:59 -0300
committerGitHub <[email protected]>2022-07-30 20:10:59 +0200
commitaedd7b8bb0e6074f69659a79df1e6b75900f5894 (patch)
tree5e644c458dbc5c8cb469b29ced4f3aef807724d5 /src/modules
parenta65f1a2b59b909c4b5cc044af560ff91642c9a56 (diff)
downloadfaker-aedd7b8bb0e6074f69659a79df1e6b75900f5894.tar.xz
faker-aedd7b8bb0e6074f69659a79df1e6b75900f5894.zip
refactor(company.name): deprecate `format` parameter (#1212)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/company/index.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/company/index.ts b/src/modules/company/index.ts
index 1dce91fd..d98eb89e 100644
--- a/src/modules/company/index.ts
+++ b/src/modules/company/index.ts
@@ -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'
@@ -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);
}