export enum Protocol { HTTP = 'http' , HTTPS = 'https' } internal export namespace Protocol { param protocol returns export function of ( protocol ) { if ( protocol . endsWith ( ':' ) ) { return of ( protocol . slice ( 0 , - 1 ) ) ; } if ( protocol . toLowerCase ( ) === Protocol . HTTP ) { return Protocol . HTTP ; } if ( protocol . toLowerCase ( ) === Protocol . HTTPS ) { return Protocol . HTTPS ; } } }