export enum BasePath { MAPS = 'data/maps/' , ENEMIES = 'data/enemies/' , ANIMATIONS = 'data/animations/' } export enum FileExtension { NONE = '' , PNG = '.png' , JSON = '.json' , OGG = '.ogg' } export class PathResolver { param base param name param extension public static convertToPath ( base , name , extension ) { return base + name . replace ( /\./g , '/' ) + extension ; } public static convertToFileName ( name ) { const split = name . split ( '.' ) ; return split [ split . length - 1 ] + '.json' ; } }