src/index.js
/**
	 * Looks up a field (case-insensitive as per RFC7230) in the provided headers object
	 * @param {Object} req = HTTP request object
	 * @param {string} field - field for which to do a case-insensitive lookup
	 * @return {boolean}
	 */
Looks up a field (case-insensitive as per RFC7230) in the provided headers object
@param {Object} req = HTTP request object
@param {string} field - field for which to do a case-insensitive lookup
@return {boolean}
Looks up a field ( case - insensitive as per RFC7230 ) in the provided headers object @param { Object } req = HTTP request object @param { string } field - field for which to do a case - insensitive lookup @return { boolean }
static headerLookup(req, field) {
		if (!req.headers || typeof req.headers !== 'object') return false;
		const _field = field.toLowerCase();
		let headerValue;
		Object.keys(req.headers).find((key) => {
			headerValue = key.toLowerCase() === _field && req.headers[key];
			return headerValue;
		});
		return headerValue || false;
	}
static headerLookup ( req , field ) { if ( ! req . headers || typeof req . headers !== 'object' ) return false ; const _field = field . toLowerCase ( ) ; let headerValue ; Object . keys ( req . headers ) . find ( ( key ) => { headerValue = key . toLowerCase ( ) === _field && req . headers [ key ] ; return headerValue ; } ) ; return headerValue || false ; }
Looks up a field (case-insensitive as per RFC7230) in the provided headers object
 @param {Object} req = HTTP request object
 @param {string} field - field for which to do a case-insensitive lookup
 @return {boolean}
Looks up a field ( case - insensitive as per RFC7230 ) in the provided headers object @param { Object } req = HTTP request object @param { string } field - field for which to do a case - insensitive lookup @return { boolean }