Skip to content

Commit

Permalink
refactor(internet): standardize signatures (#1845)
Browse files Browse the repository at this point in the history
Co-authored-by: ST-DDT <[email protected]>
Co-authored-by: Shinigami <[email protected]>
  • Loading branch information
3 people authored Mar 14, 2023
1 parent c2b21d8 commit a943353
Show file tree
Hide file tree
Showing 5 changed files with 1,318 additions and 103 deletions.
2 changes: 1 addition & 1 deletion docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function createRandomUser(): User {
const sex = faker.person.sexType();
const firstName = faker.person.firstName(sex);
const lastName = faker.person.lastName();
const email = faker.internet.email(firstName, lastName);
const email = faker.internet.email({ firstName, lastName });

return {
_id: faker.datatype.uuid(),
Expand Down
4 changes: 2 additions & 2 deletions src/modules/git/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ export class GitModule {
const firstName = this.faker.person.firstName();
const lastName = this.faker.person.lastName();
const fullName = this.faker.person.fullName({ firstName, lastName });
const username = this.faker.internet.userName(firstName, lastName);
const username = this.faker.internet.userName({ firstName, lastName });
let user = this.faker.helpers.arrayElement([fullName, username]);
const email = this.faker.internet.email(firstName, lastName);
const email = this.faker.internet.email({ firstName, lastName });

// Normalize user according to https://github.com/libgit2/libgit2/issues/5342
user = user.replace(/^[\.,:;"\\']|[\<\>\n]|[\.,:;"\\']$/g, '');
Expand Down
Loading

0 comments on commit a943353

Please sign in to comment.