Last active
February 10, 2023 06:52
-
-
Save tudorilisoi/d8a08c33772cf9721bfb8c8c74825d45 to your computer and use it in GitHub Desktop.
Revisions
-
tudorilisoi created this gist
Feb 10, 2023 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ import { faker } from '@faker-js/faker'; const MAX = 100 const users = [] const departaments = 'bridge engine'.split(' ') for (let i = 0; i < MAX; i++) { let firstName = faker.name.firstName(); let lastName = faker.name.lastName(); const user = { name: firstName + ' ' + lastName, email:faker.internet.email(firstName, lastName), phone:faker.phone.number('###-###-####'), last_login: faker.date.recent(180) .toJSON().slice(0,10).split('-').reverse().join('/'), dept:departaments[Math.floor(Math.random()*departaments.length)], profile_image:faker.image.avatar(), } users.push(user) } // console.dir(users) console.log(JSON.stringify(users,2,2))