obolus/www/utils/misc.js

9 lines
335 B
JavaScript
Raw Normal View History

2019-05-22 18:34:58 +00:00
export const capitalize = s => s[0].toUpperCase() + s.slice(1)
const getRandomItemFromArray = a => a[Math.floor((Math.random() * a.length))]
export const getRandomSlogan = () => '💸 ' + getRandomItemFromArray(
['centkrieger', 'pfandsklave', 'minusexperte'],
)
export const getAvatarOfFallback = avatar => avatar || '_fallback'