Skip to content

Commit

Permalink
fix: ASCII-fy domainWord() (#1520)
Browse files Browse the repository at this point in the history
  • Loading branch information
schw4rzlicht authored Dec 13, 2022
1 parent b2a72bc commit cf764b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/modules/internet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,8 @@ export class InternetModule {
* @since 2.0.1
*/
domainWord(): string {
return `${this.faker.word.adjective()}-${this.faker.word.noun()}`
.replace(/([\\~#&*{}/:<>?|\"'])/gi, '')
.replace(/\s/g, '-')
.replace(/-{2,}/g, '-')
return this.faker.helpers
.slugify(`${this.faker.word.adjective()}-${this.faker.word.noun()}`)
.toLowerCase();
}

Expand Down

0 comments on commit cf764b9

Please sign in to comment.