-
-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into update-eslint-define-config
- Loading branch information
Showing
13 changed files
with
210 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default [ | ||
'{{person.jobType}} {{person.jobArea}} {{person.jobDescriptor}}', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1133,7 +1133,7 @@ const iban: Iban = { | |
total: 24, | ||
bban: [ | ||
{ | ||
type: 'c', | ||
type: 'a', | ||
count: 4, | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.email() // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne'}) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne'}) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev', allowSpecialCharacters: true }) // 'Jeanne%[email protected]' | ||
* | ||
|
@@ -107,7 +109,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.email() // '[email protected]' | ||
* faker.internet.email('Jeanne', 'Doe') // '[email protected]' | ||
* faker.internet.email('Jeanne') // '[email protected]' | ||
* faker.internet.email('Jeanne') // '[email protected]' | ||
* faker.internet.email('Jeanne', 'Doe') // '[email protected]' | ||
* faker.internet.email('Jeanne', 'Doe', 'example.fakerjs.dev') // '[email protected]' | ||
* faker.internet.email('Jeanne', 'Doe', 'example.fakerjs.dev', { allowSpecialCharacters: true }) // 'Jeanne%[email protected]' | ||
* | ||
|
@@ -145,7 +149,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.email() // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev' }) // '[email protected]' | ||
* faker.internet.email({ firstName: 'Jeanne', lastName: 'Doe', provider: 'example.fakerjs.dev', allowSpecialCharacters: true }) // 'Jeanne%[email protected]' | ||
* | ||
|
@@ -248,8 +254,8 @@ export class InternetModule extends ModuleBase { | |
} | ||
|
||
const { | ||
firstName = this.faker.person.firstName(), | ||
lastName = legacyLastName ?? this.faker.person.lastName(), | ||
firstName, | ||
lastName = legacyLastName, | ||
provider = legacyProvider ?? | ||
this.faker.helpers.arrayElement( | ||
this.faker.definitions.internet.free_email | ||
|
@@ -295,7 +301,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.exampleEmail() // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe', allowSpecialCharacters: true }) // 'Jeanne%[email protected]' | ||
* | ||
* @since 3.1.0 | ||
|
@@ -331,7 +339,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.exampleEmail() // '[email protected]' | ||
* faker.internet.exampleEmail('Jeanne', 'Doe') // '[email protected]' | ||
* faker.internet.exampleEmail('Jeanne') // '[email protected]' | ||
* faker.internet.exampleEmail('Jeanne') // '[email protected]' | ||
* faker.internet.exampleEmail('Jeanne', 'Doe') // '[email protected]' | ||
* faker.internet.exampleEmail('Jeanne', 'Doe', { allowSpecialCharacters: true }) // 'Jeanne%[email protected]' | ||
* | ||
* @since 3.1.0 | ||
|
@@ -365,7 +375,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.exampleEmail() // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe' }) // '[email protected]' | ||
* faker.internet.exampleEmail({ firstName: 'Jeanne', lastName: 'Doe', allowSpecialCharacters: true }) // 'Jeanne%[email protected]' | ||
* | ||
* @since 3.1.0 | ||
|
@@ -454,8 +466,8 @@ export class InternetModule extends ModuleBase { | |
} | ||
|
||
const { | ||
firstName = this.faker.person.firstName(), | ||
lastName = legacyLastName ?? this.faker.person.lastName(), | ||
firstName, | ||
lastName = legacyLastName, | ||
allowSpecialCharacters = legacyOptions?.allowSpecialCharacters ?? false, | ||
} = options; | ||
|
||
|
@@ -485,7 +497,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.userName() // 'Nettie_Zboncak40' | ||
* faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne98' - note surname is not used | ||
* faker.internet.userName({ firstName: 'Jeanne' }) // 'Jeanne98' | ||
* faker.internet.userName({ firstName: 'Jeanne' }) // 'Jeanne.Smith98' | ||
* faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne_Doe98' | ||
* faker.internet.userName({ firstName: 'John', lastName: 'Doe' }) // 'John.Doe' | ||
* faker.internet.userName({ firstName: 'Hélene', lastName: 'Müller' }) // 'Helene_Muller11' | ||
* faker.internet.userName({ firstName: 'Фёдор', lastName: 'Достоевский' }) // 'Fedor.Dostoevskii50' | ||
|
@@ -520,7 +534,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.userName() // 'Nettie_Zboncak40' | ||
* faker.internet.userName('Jeanne', 'Doe') // 'Jeanne98' - note surname is not used | ||
* faker.internet.userName('Jeanne') // 'Jeanne98' | ||
* faker.internet.userName('Jeanne') // 'Jeanne.Smith98' | ||
* faker.internet.userName('Jeanne', 'Doe') // 'Jeanne_Doe98' | ||
* faker.internet.userName('John', 'Doe') // 'John.Doe' | ||
* faker.internet.userName('Hélene', 'Müller') // 'Helene_Muller11' | ||
* faker.internet.userName('Фёдор', 'Достоевский') // 'Fedor.Dostoevskii50' | ||
|
@@ -546,7 +562,9 @@ export class InternetModule extends ModuleBase { | |
* | ||
* @example | ||
* faker.internet.userName() // 'Nettie_Zboncak40' | ||
* faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne98' - note surname is not used | ||
* faker.internet.userName({ firstName: 'Jeanne'}) // 'Jeanne98' | ||
* faker.internet.userName({ firstName: 'Jeanne'}) // 'Jeanne.Smith98' | ||
* faker.internet.userName({ firstName: 'Jeanne', lastName: 'Doe'}) // 'Jeanne_Doe98' | ||
* faker.internet.userName({ firstName: 'John', lastName: 'Doe' }) // 'John.Doe' | ||
* faker.internet.userName({ firstName: 'Hélene', lastName: 'Müller' }) // 'Helene_Muller11' | ||
* faker.internet.userName({ firstName: 'Фёдор', lastName: 'Достоевский' }) // 'Fedor.Dostoevskii50' | ||
|
@@ -608,23 +626,24 @@ export class InternetModule extends ModuleBase { | |
const { | ||
firstName = this.faker.person.firstName(), | ||
lastName = legacyLastName ?? this.faker.person.lastName(), | ||
lastName: hasLastName = legacyLastName, | ||
} = options; | ||
|
||
let result: string; | ||
switch (this.faker.number.int(2)) { | ||
const strategy = this.faker.number.int(hasLastName ? 1 : 2); | ||
const separator = this.faker.helpers.arrayElement(['.', '_']); | ||
switch (strategy) { | ||
case 0: | ||
result = `${firstName}${this.faker.number.int(99)}`; | ||
result = `${firstName}${separator}${lastName}${this.faker.number.int( | ||
99 | ||
)}`; | ||
break; | ||
case 1: | ||
result = | ||
firstName + this.faker.helpers.arrayElement(['.', '_']) + lastName; | ||
result = `${firstName}${separator}${lastName}`; | ||
break; | ||
case 2: | ||
default: | ||
result = `${firstName}${this.faker.helpers.arrayElement([ | ||
'.', | ||
'_', | ||
])}${lastName}${this.faker.number.int(99)}`; | ||
result = `${firstName}${this.faker.number.int(99)}`; | ||
break; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.