/ src / common / utils / humanise.js
humanise.js
 1  const humanise = (value, joiner = ' ') => {
 2    if (!value) {
 3      return ''
 4    }
 5  
 6    return value
 7      .split('_')
 8      .map(word => `${word[0]}${word.slice(1).toLowerCase()}`)
 9      .join(joiner)
10  }
11  
12  export default humanise