Last active
May 18, 2023 06:08
-
-
Save Super-Chama/b2a974d8d7945364703df345a2e028ea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const faker = { | |
name: { | |
firstName() { | |
// array containing 100 random first names | |
const firstNames = [ | |
"Tim", | |
"John", | |
"Jane", | |
"Jack", | |
"Jill", | |
"Alan", | |
"Mary", | |
"Mavis", | |
"Mildred", | |
"Mortimer", | |
"Morticia", | |
"Fred", | |
"Freda", | |
"Tom", | |
"Tina", | |
"Terry", | |
"Trevor", | |
"Trevi", | |
"Lili", | |
"Lola", | |
"Lily", | |
"Fred", | |
"Fox", | |
"Ken", | |
"Kenny", | |
"Kendra", | |
"Kendrick", | |
]; | |
return firstNames[Math.floor(Math.random() * firstNames.length)]; | |
}, | |
lastName() { | |
// array containing 100 random last names | |
const lastNames = [ | |
"Smith", | |
"Johnson", | |
"Williams", | |
"Jones", | |
"Brown", | |
"Davis", | |
"Miller", | |
"Wilson", | |
"Moore", | |
"Taylor", | |
"Anderson", | |
"Thomas", | |
"Jackson", | |
"White", | |
"Harris", | |
"Martin", | |
"Thompson", | |
"Garcia", | |
"Martinez", | |
"Robinson", | |
"Clark", | |
"Rodriguez", | |
"Lewis", | |
"Lee", | |
"Walker", | |
"Hall", | |
"Allen", | |
"Young", | |
"Hernandez", | |
"King", | |
"Wright", | |
"Lopez", | |
"Hill", | |
"Scott", | |
"Green", | |
"Adams", | |
"Baker", | |
"Gonzalez", | |
"Nelson", | |
"Carter", | |
"Mitchell", | |
"Perez", | |
"Roberts", | |
"Turner", | |
"Phillips", | |
"Campbell", | |
"Parker", | |
"Evans", | |
"Edwards", | |
"Collins", | |
"Stewart", | |
"Sanchez", | |
"Morris", | |
"Rogers", | |
"Reed", | |
"Cook", | |
"Morgan", | |
"Bell", | |
"Murphy", | |
"Bailey", | |
"Rivera", | |
"Cooper", | |
"Richardson", | |
"Cox", | |
"Howard", | |
"Ward", | |
"Torres", | |
"Peterson", | |
"Gray", | |
"Ramirez", | |
"James", | |
"Watson", | |
"Brooks", | |
"Kelly", | |
"Sanders", | |
"Price", | |
"Bennett", | |
"Wood", | |
"Barnes", | |
"Ross", | |
"Henderson", | |
"Coleman", | |
"Jenkins", | |
"Perry", | |
"Powell", | |
"Long", | |
"Patterson", | |
"Hughes", | |
"Flores", | |
"Washington", | |
"Butler", | |
"Simmons", | |
"Foster", | |
"Gonzales", | |
"Bryant", | |
"Alexander", | |
"Russell", | |
"Griffin", | |
"Diaz", | |
"Hayes", | |
]; | |
return lastNames[Math.floor(Math.random() * lastNames.length)]; | |
}, | |
}, | |
internet: { | |
email() { | |
const addresses = [ | |
"test", | |
"hello", | |
"world", | |
"example", | |
"sample", | |
"candidate", | |
"recruiter", | |
"hiring", | |
"manager", | |
"interviewer", | |
]; | |
const domains = [ | |
"gmail.com", | |
"yahoo.com", | |
"outlook.com", | |
"aol.com", | |
"hotmail.com", | |
"protonmail.com", | |
"zoho.com", | |
]; | |
return `${ | |
addresses[Math.floor(Math.random() * addresses.length)] | |
}${Math.floor(1000 + Math.random() * 9000)}@${ | |
domains[Math.floor(Math.random() * domains.length)] | |
}`; | |
}, | |
}, | |
date: { | |
past() { | |
const date = new Date(); | |
date.setDate(date.getDate() - Math.floor(Math.random() * 100)); | |
// return date in YYYY-MM-DD format | |
return date.toISOString().split("T")[0]; | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment