fix(employee): Added capitalize util to capitalize names. (TV-674)
Squashed commit of the following: commit d23bba16bc5378857b3cfd38afee40c3e60971a9 Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Fri Sep 24 15:51:45 2021 +0200 Added capitalize util and implemented inside employee mapping
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
export function capitalizeWords(words: string): string {
|
||||
return words
|
||||
.split(' ')
|
||||
.map(word => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`)
|
||||
.join(' ');
|
||||
}
|
||||
Reference in New Issue
Block a user