mirror of https://github.com/aldy505/code.git
7 lines
174 B
TypeScript
7 lines
174 B
TypeScript
|
export function convertCase(str: string): string {
|
||
|
return str
|
||
|
.split(' ')
|
||
|
.reduce((p: string[], c) => { p.push(c.toLowerCase()); return p; }, [])
|
||
|
.join('-');
|
||
|
}
|