src/Detector.js
function caseInsensitiveLookup (object, lookup) {
  
    lookup = lookup.toLowerCase();

    for (var property in object) {

        if (object.hasOwnProperty(property) && lookup == property.toLowerCase()) {

            return object[property];

        }

    }

    return undefined;
  
}
function caseInsensitiveLookup (object, lookup) {
  
    lookup = lookup.toLowerCase();

    for (var property in object) {

        if (object.hasOwnProperty(property) && lookup == property.toLowerCase()) {

            return object[property];

        }

    }

    return undefined;
  
}
function caseInsensitiveLookup ( object , lookup ) { lookup = lookup . toLowerCase ( ) ; for ( var property in object ) { if ( object . hasOwnProperty ( property ) && lookup == property . toLowerCase ( ) ) { return object [ property ] ; } } return undefined ; }
Looks up an object property in a case-insensitive manner, it will find the first property that matches.
Although Node.js currently normalises request headers to lower case, this may not be true forever.
The number of headers is pretty limited for any particular request. So this should add too much processing
time.

@param  object object
@param  string lookup

@return mixed         Returns the property value or undefined if the lookup was not found.
Looks up an object property in a case - insensitive manner it will find the first property that matches . Although Node . js currently normalises request headers to lower case this may not be true forever . The number of headers is pretty limited for any particular request . So this should add too much processing time .