generate-fake-identity
v1.0.5
Published
Simple npm module to create a realistic and complete identity
Downloads
11
Maintainers
Readme
generate-fake-identity
Installation
npm i generate-fake-identity
Example
const generateRandomIdentity = require("generate-fake-identity");
(async () => {
const identityRandom = await generateRandomIdentity();
console.log(identityRandom);
// ->
// {
// "results": [
// {
// "user": {
// "gender": "male",
// "name": {
// "title": "mr",
// "first": "connor",
// "last": "smith"
// },
// "location": {
// "street": "3643 andersons bay road",
// "city": "hastings",
// "state": "auckland",
// "zip": 44624
// },
// "email": "[email protected]",
// "username": "silverfish990",
// "password": "delilah",
// "salt": "bVSiuTBk",
// "md5": "f927c34b7201b38f1e37ce7a27f4e82f",
// "sha1": "0b5967988802e21d43499f16c5c2644b05342c24",
// "sha256": "4bb5db78b553d8cec91dd22109b7200593c20b9e8c9a0e6445a52631b071f2a6",
// "registered": 1053840923,
// "dob": 260804117,
// "phone": "(487)-902-1376",
// "cell": "(866)-578-4347",
// "picture": {
// "large": "https://randomuser.me/api/portraits/men/4.jpg",
// "medium": "https://randomuser.me/api/portraits/med/men/4.jpg",
// "thumbnail": "https://randomuser.me/api/portraits/thumb/men/4.jpg"
// }
// }
// }
// ],
// "nationality": "NZ",
// "seed": "0bf94e266f0606530c",
// "version": "0.8"
// }
const identityRandomUs = await generateRandomIdentity({ country: "us" });
console.log(identityRandomUs);
// ->
// {
// "results": [
// {
// "user": {
// "gender": "female",
// "name": {
// "title": "mrs",
// "first": "kenzi",
// "last": "andrews"
// },
// "location": {
// "street": "4184 washington ave",
// "city": "wichita",
// "state": "oklahoma",
// "zip": 92134
// },
// "email": "[email protected]",
// "username": "brownswan673",
// "password": "jessica",
// "salt": "WB3zSxsU",
// "md5": "af06e1e92b3791d887c0eb40d14acc87",
// "sha1": "e612f843d186432ce0bea852e25f84e102acfd3c",
// "sha256": "6254e68b8ae89bcb321a4ef44e892c45398c1490b015b8c6b6c4ec8e4b906b44",
// "registered": 1175608338,
// "dob": 387835793,
// "phone": "(312)-221-4982",
// "cell": "(267)-770-1407",
// "SSN": "173-53-0915",
// "picture": {
// "large": "https://randomuser.me/api/portraits/women/89.jpg",
// "medium": "https://randomuser.me/api/portraits/med/women/89.jpg",
// "thumbnail": "https://randomuser.me/api/portraits/thumb/women/89.jpg"
// }
// }
// }
// ],
// "nationality": "US",
// "seed": "12191cefafd287340d",
// "version": "0.8"
// }
const indentityRandomUs1000 = await generateRandomIdentity({ country: "us", length: 1000 });
console.log(indentityRandomUs1000);
// ->
// {
// results: [
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] }, { user: [Object] }, { user: [Object] },
// { user: [Object] },
// ... 900 more items
// ],
// nationality: 'US',
// seed: 'bcd0f8b7fa0a88ba0d',
// version: '0.8'
// }
})();