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
const shortid = require("shortid"); // shortid.generate() returns a unique "short" id | |
const txtgen = require("txtgen"); // txtgen.sentence() returns random "readable" sentences | |
const faker = require("faker"); // faker is used for generating random fake data. | |
const _ = require("lodash"); // lodash is a utility lib for Javascript | |
const users = generateUsers(10); | |
export const contacts = _.mapKeys(users, "user_id"); | |
export const getMessages = messagesPerUser => { | |
let messages = {}; | |
_.forEach(users, user => { |