Skip to content

Commit cf764b9

Browse files
authored
fix: ASCII-fy domainWord() (#1520)
1 parent b2a72bc commit cf764b9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/modules/internet/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,8 @@ export class InternetModule {
358358
* @since 2.0.1
359359
*/
360360
domainWord(): string {
361-
return `${this.faker.word.adjective()}-${this.faker.word.noun()}`
362-
.replace(/([\\~#&*{}/:<>?|\"'])/gi, '')
363-
.replace(/\s/g, '-')
364-
.replace(/-{2,}/g, '-')
361+
return this.faker.helpers
362+
.slugify(`${this.faker.word.adjective()}-${this.faker.word.noun()}`)
365363
.toLowerCase();
366364
}
367365

0 commit comments

Comments
 (0)