nit: I'd have used {} or () around such expression, like:
`let isGetOrHead = function(mode) (mode == "GET" || mode == "HEAD");`
`let isGetOrHead = function(mode) {return mode == "GET" || mode == "HEAD";};`