also the number of string compares i have to do because of javascript's lack of both enums and type literals makes my skin crawl