-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.js
26 lines (23 loc) · 814 Bytes
/
utils.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { words } from "./words"
export function getRandomWord() {
const randomIndex = Math.floor(Math.random() * words.length)
return words[randomIndex]
}
export function getFarewellText(language) {
const options = [
`Farewell, ${language}`,
`Adios, ${language}`,
`R.I.P., ${language}`,
`We'll miss you, ${language}`,
`Oh no, not ${language}!`,
`${language} bites the dust`,
`Gone but not forgotten, ${language}`,
`The end of ${language} as we know it`,
`Off into the sunset, ${language}`,
`${language}, it's been real`,
`${language}, your watch has ended`,
`${language} has left the building`
];
const randomIndex = Math.floor(Math.random() * options.length);
return options[randomIndex];
}