lib/helpers.js
function (headers, key, def) {
    if (headers instanceof Array) {
      var regex = new RegExp(key, 'i')
      for (var i = 0; i < headers.length; i++) {
        if (regex.test(headers[i].name)) {
          return headers[i].value
        }
      }
    }

    return def !== undefined ? def : false
  }
function (headers, key, def) {
    if (headers instanceof Array) {
      var regex = new RegExp(key, 'i')
      for (var i = 0; i < headers.length; i++) {
        if (regex.test(headers[i].name)) {
          return headers[i].value
        }
      }
    }

    return def !== undefined ? def : false
  }
function ( headers , key , def ) { if ( headers instanceof Array ) { var regex = new RegExp ( key , 'i' ) for ( var i = 0 ; i < headers . length ; i ++ ) { if ( regex . test ( headers [ i ] . name ) ) { return headers [ i ] . value } } } return def !== undefined ? def : false }
uses regex to match a header value
uses regex to match a header value