2019-03-18 11:35:03 +01:00
|
|
|
export const messages = [];
|
|
|
|
|
|
|
|
|
|
const authors = ["Aaron", "David", "Vincent"];
|
|
|
|
|
const content = [
|
|
|
|
|
"Lorem ipsum dolor sit amet",
|
|
|
|
|
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem",
|
|
|
|
|
"Excepteur sint occaecat cupidatat non proident"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
function chooseRandomly(array) {
|
|
|
|
|
const index = Math.floor(Math.random() * array.length);
|
|
|
|
|
return array[index];
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-18 14:34:35 +01:00
|
|
|
for (let i = 1; i < 16000; i++) {
|
2019-03-18 11:35:03 +01:00
|
|
|
messages.push({
|
|
|
|
|
id: i,
|
|
|
|
|
author: chooseRandomly(authors),
|
|
|
|
|
msg: `${i}: ${chooseRandomly(content)}`,
|
|
|
|
|
likes: 0
|
|
|
|
|
});
|
|
|
|
|
}
|