Let your editor cheer you on while you code!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at a834c2e50d24e7e8355641725c227663ba274a16 31 lines 704 B view raw
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 project 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] 19 20// Create a random message closure 21const getRandomMessage = getRandomFromArray(messages) 22 23// Return a random message w/ or w/o an emoji 24const getMessage = emoji => { 25 return `${emoji ? '🎉 ' : ''}${getRandomMessage()}` 26} 27 28module.exports = { 29 messages, 30 getMessage 31}