Last active
March 9, 2017 18:00
-
-
Save swashcap/c76d2940c18cc2858ad397a9086901b8 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"users": [ | |
{ | |
"birthday": 1480634264530, | |
"email": "Kira.Rosenbaum83@hotmail.com", | |
"favoriteColor": "indigo", | |
"id": "43aa36bb-7c93-4651-a317-1af1b4879856", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/mrjamesnoble/128.jpg", | |
"joinDate": 1480634264531, | |
"name": "Mandy Schowalter", | |
"username": "Carlee.Stokes71" | |
}, | |
{ | |
"birthday": 1480634264533, | |
"email": "Sandrine54@hotmail.com", | |
"favoriteColor": "olive", | |
"id": "952492cc-5ddb-42f9-8c8d-0e2f4e14652a", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/calebjoyce/128.jpg", | |
"joinDate": 1480634264533, | |
"name": "Cedrick Spinka", | |
"username": "Oral46" | |
}, | |
{ | |
"birthday": 1480634264533, | |
"email": "Allene73@yahoo.com", | |
"favoriteColor": "ivory", | |
"id": "b2e00c12-428d-40fe-a996-e8309ff419ee", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/fuck_you_two/128.jpg", | |
"joinDate": 1480634264534, | |
"name": "Mrs. Bonita Koepp", | |
"username": "Kobe16" | |
}, | |
{ | |
"birthday": 1480634264534, | |
"email": "Reid15@yahoo.com", | |
"favoriteColor": "cyan", | |
"id": "09d169f9-b359-4953-903d-6d6338167c51", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/nfedoroff/128.jpg", | |
"joinDate": 1480634264534, | |
"name": "Drake Blick", | |
"username": "Johnathan41" | |
}, | |
{ | |
"birthday": 1480634264535, | |
"email": "Rosetta_Vandervort@hotmail.com", | |
"favoriteColor": "cyan", | |
"id": "41be669c-a3df-4b66-b10c-ac7d66c0bff3", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/beweinreich/128.jpg", | |
"joinDate": 1480634264535, | |
"name": "Barton Predovic", | |
"username": "Darrion_Fadel27" | |
}, | |
{ | |
"birthday": 1480634264535, | |
"email": "Ernest11@gmail.com", | |
"favoriteColor": "pink", | |
"id": "d84e03f9-f926-4cf5-90f1-020211aad632", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/mvdheuvel/128.jpg", | |
"joinDate": 1480634264535, | |
"name": "Lupe Berge", | |
"username": "Nestor51" | |
}, | |
{ | |
"birthday": 1480634264535, | |
"email": "Vilma81@yahoo.com", | |
"favoriteColor": "gold", | |
"id": "0531d60d-62a2-42a6-bef1-457e05cb6bcf", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/alagoon/128.jpg", | |
"joinDate": 1480634264535, | |
"name": "Patience Schiller", | |
"username": "Darlene.Zemlak92" | |
}, | |
{ | |
"birthday": 1480634264535, | |
"email": "Summer_Kassulke0@yahoo.com", | |
"favoriteColor": "gold", | |
"id": "d1aacbc5-5154-4788-855f-121bacb3519e", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/santi_urso/128.jpg", | |
"joinDate": 1480634264535, | |
"name": "Charles Christiansen III", | |
"username": "Shawna79" | |
}, | |
{ | |
"birthday": 1480634264535, | |
"email": "Oswald96@yahoo.com", | |
"favoriteColor": "yellow", | |
"id": "c9b3aa14-c96f-4572-9bab-d0584d461806", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/geneseleznev/128.jpg", | |
"joinDate": 1480634264535, | |
"name": "Burdette Gutmann", | |
"username": "Presley_Williamson" | |
}, | |
{ | |
"birthday": 1480634264535, | |
"email": "Guillermo_Daugherty27@hotmail.com", | |
"favoriteColor": "lavender", | |
"id": "98e65f3f-6dd5-4aa4-b318-2d4a9ae9673d", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/bighanddesign/128.jpg", | |
"joinDate": 1480634264535, | |
"name": "Summer Quitzon", | |
"username": "Jevon_OConnell" | |
}, | |
{ | |
"birthday": 1480634264536, | |
"email": "Jackie_Willms@gmail.com", | |
"favoriteColor": "cyan", | |
"id": "0ebfca2b-f3de-4479-bca1-6a0d0269339b", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/S0ufi4n3/128.jpg", | |
"joinDate": 1480634264536, | |
"name": "Juana Turner", | |
"username": "Donnell.Kris70" | |
}, | |
{ | |
"birthday": 1480634264536, | |
"email": "Estefania61@yahoo.com", | |
"favoriteColor": "indigo", | |
"id": "aaf4b271-ccc8-4548-ae89-168538398a30", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/ismail_biltagi/128.jpg", | |
"joinDate": 1480634264536, | |
"name": "Judson Effertz", | |
"username": "Alexanne57" | |
}, | |
{ | |
"birthday": 1480634264536, | |
"email": "Bianka_DAmore@yahoo.com", | |
"favoriteColor": "red", | |
"id": "de3c3872-84df-456b-ac5e-12a74124a8ae", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/marcobarbosa/128.jpg", | |
"joinDate": 1480634264536, | |
"name": "Alaina Reilly", | |
"username": "Rosalee26" | |
}, | |
{ | |
"birthday": 1480634264536, | |
"email": "Nya_Rosenbaum63@gmail.com", | |
"favoriteColor": "orange", | |
"id": "b7dd890f-3d17-40a0-9364-8cac8c8852b4", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/marclgonzales/128.jpg", | |
"joinDate": 1480634264536, | |
"name": "Ms. Greyson Klein", | |
"username": "Johnny.Funk78" | |
}, | |
{ | |
"birthday": 1480634264536, | |
"email": "Zackary.Koch64@hotmail.com", | |
"favoriteColor": "indigo", | |
"id": "c37ee8be-a538-43b5-b28e-fd44ae8f9e92", | |
"image": "https://s3.amazonaws.com/uifaces/faces/twitter/travis_arnold/128.jpg", | |
"joinDate": 1480634264536, | |
"name": "Skye Pagac", | |
"username": "Maia.Mitchell" | |
} | |
], | |
"usersPermissions": [ | |
{ | |
"id": "59878ddf-8c73-41c4-bcc9-5a3759099e6e", | |
"read": true, | |
"userId": "43aa36bb-7c93-4651-a317-1af1b4879856", | |
"write": true | |
}, | |
{ | |
"id": "d276acca-787c-402c-9e52-fbc7dbb02d1b", | |
"read": true, | |
"userId": "952492cc-5ddb-42f9-8c8d-0e2f4e14652a", | |
"write": false | |
}, | |
{ | |
"id": "c576e9c6-9f7f-4753-bed6-5a27d7606e7b", | |
"read": false, | |
"userId": "b2e00c12-428d-40fe-a996-e8309ff419ee", | |
"write": false | |
}, | |
{ | |
"id": "4296c11e-a029-4bb9-bcf3-f6d147971013", | |
"read": true, | |
"userId": "09d169f9-b359-4953-903d-6d6338167c51", | |
"write": true | |
}, | |
{ | |
"id": "fcfd2a13-bf3d-4d71-a371-88dc456d1050", | |
"read": true, | |
"userId": "41be669c-a3df-4b66-b10c-ac7d66c0bff3", | |
"write": false | |
}, | |
{ | |
"id": "81ab04b9-2fce-4dde-ac0a-34b8482f6390", | |
"read": false, | |
"userId": "d84e03f9-f926-4cf5-90f1-020211aad632", | |
"write": false | |
}, | |
{ | |
"id": "b4166b2b-b562-40a1-bad2-087fb9e1f4c8", | |
"read": false, | |
"userId": "0531d60d-62a2-42a6-bef1-457e05cb6bcf", | |
"write": false | |
}, | |
{ | |
"id": "e7b995cb-0235-404b-a66c-a4c297dd5bae", | |
"read": false, | |
"userId": "d1aacbc5-5154-4788-855f-121bacb3519e", | |
"write": false | |
}, | |
{ | |
"id": "929ad2ce-54bd-48b7-b77d-a1f7ba58c41c", | |
"read": false, | |
"userId": "c9b3aa14-c96f-4572-9bab-d0584d461806", | |
"write": true | |
}, | |
{ | |
"id": "7b484575-380d-4e0f-a85a-604e50c27dde", | |
"read": true, | |
"userId": "98e65f3f-6dd5-4aa4-b318-2d4a9ae9673d", | |
"write": false | |
}, | |
{ | |
"id": "0acd2c01-aaf9-4448-82db-66bc70dc9910", | |
"read": false, | |
"userId": "0ebfca2b-f3de-4479-bca1-6a0d0269339b", | |
"write": true | |
}, | |
{ | |
"id": "93e392e4-ea2c-4d3a-b877-8657a51956c7", | |
"read": true, | |
"userId": "aaf4b271-ccc8-4548-ae89-168538398a30", | |
"write": true | |
}, | |
{ | |
"id": "9123c09b-e785-4d0c-ae98-a710fdbd535f", | |
"read": true, | |
"userId": "de3c3872-84df-456b-ac5e-12a74124a8ae", | |
"write": false | |
}, | |
{ | |
"id": "951ef349-e324-4948-9dc7-d149fa4b2ade", | |
"read": true, | |
"userId": "b7dd890f-3d17-40a0-9364-8cac8c8852b4", | |
"write": false | |
}, | |
{ | |
"id": "165910f8-0e45-4adc-b8ac-aac76a3e7abd", | |
"read": true, | |
"userId": "c37ee8be-a538-43b5-b28e-fd44ae8f9e92", | |
"write": false | |
} | |
] | |
} |
This file contains 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
'use strict'; | |
/** | |
* Generate fake users and users' permissions using Faker.js | |
* | |
* {@link https://github.com/marak/Faker.js/#api-methods} | |
*/ | |
const faker = require('faker'); | |
console.log(JSON.stringify(Array.from(Array(15)).reduce( | |
({ users, usersPermissions }) => { | |
const userId = faker.random.uuid(); | |
return { | |
users: users.concat({ | |
birthday: Date.now(faker.date.past()), | |
email: faker.internet.email(), | |
favoriteColor: faker.commerce.color(), | |
id: userId, | |
image: faker.internet.avatar(), | |
joinDate: Date.now(faker.date.recent()), | |
name: faker.name.findName(), | |
username: faker.internet.userName(), | |
}), | |
usersPermissions: usersPermissions.concat({ | |
id: faker.random.uuid(), | |
read: faker.random.boolean(), | |
userId, | |
write: faker.random.boolean(), | |
}), | |
}; | |
}, | |
{ users: [], usersPermissions: [] } | |
), null, 2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment