blob: 890275c9d662ae1d985f6a864398e601853e901f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import capitalise from './capitalise'
/**
*
* @param {String} name
* @returns Formats the Template Name
*/
export default function formatName(name){
return name.includes('multiple')
?
`${capitalise(name.split('-')[1])} ${capitalise(name.split('-')[0])}'s`
:
name
.split('-')
.map((str)=>(
str.replace('with','')
))
.map((str)=>(
str.replace('framework','')
))
.map((str)=>(capitalise(str)))
.join(' ')
.trim()
}
|