Typescript Split String Multiple If Statements In Google