import { HTTPMethod , IProtocol } from "./interfaces" ; param key export const normalizeHeaderKey = ( key ) => key . toLowerCase ( ) ; export const isRESTMethod = ( maybeMethod ) : maybeMethod is HTTPMethod => [ "get" , "head" , "post" , "put" , "patch" , "delete" , "options" , "trace" , ] . includes ( maybeMethod ) ; export const isKnownProtocol = ( maybeProtocol ) : maybeProtocol is IProtocol => /^https?$/ . test ( maybeProtocol ) ;