Let your editor cheer you on while you code!
1const getRandomFromArray = require('get-random-from-array')
2
3// Messages pool
4const messages = [
5 'Great work!',
6 'Keep it up!',
7 "I love what you're doing.",
8 'Nice!',
9 'I love it!',
10 'I see what you did there...',
11 'Heck yeah!',
12 'You look great!',
13 'Clever — I like it!',
14 'This is really coming together.',
15 "I'm so proud of you!",
16 'This is really great work.',
17 "I'm a huge fan of what you're doing!",
18 "Woah, that's awesome!",
19 'This is fantastic!',
20 "Oh, that's super cool.",
21 'Slick!',
22 'This is amazing!',
23 "You're truly amazing.",
24 'Game changing.',
25 "You're a genius!",
26 'That was brilliant!',
27 'That was superb.',
28 "You're going to change the world."
29]
30
31// Create a random message closure
32const getRandomMessage = getRandomFromArray(messages)
33
34// Return a random message w/ or w/o an emoji
35const getMessage = emoji => {
36 return `${emoji ? '🎉 ' : ''}${getRandomMessage()}`
37}
38
39module.exports = {
40 messages,
41 getMessage
42}