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:
Erik Tiekstra
2021-09-28 08:03:27 +02:00
parent 30306a30b8
commit 4fa5fbcae0
2 changed files with 13 additions and 12 deletions
@@ -0,0 +1,6 @@
export function capitalizeWords(words: string): string {
return words
.split(' ')
.map(word => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`)
.join(' ');
}