Typescript Enum Name To String Javascript Substring Until Character