lib/ecstatic.js
function shouldCompressGzip(req) {
  const headers = req.headers;

  return headers && headers['accept-encoding'] &&
    headers['accept-encoding']
      .split(',')
      .some(el => ['*', 'compress', 'gzip', 'deflate'].indexOf(el.trim()) !== -1)
  ;
}
function shouldCompressGzip(req) {
  const headers = req.headers;

  return headers && headers['accept-encoding'] &&
    headers['accept-encoding']
      .split(',')
      .some(el => ['*', 'compress', 'gzip', 'deflate'].indexOf(el.trim()) !== -1)
  ;
}
function shouldCompressGzip ( req ) { const headers = req . headers ; return headers && headers [ 'accept-encoding' ] && headers [ 'accept-encoding' ] . split ( ',' ) . some ( el => [ '*' , 'compress' , 'gzip' , 'deflate' ] . indexOf ( el . trim ( ) ) !== - 1 ) ; }
Check to see if we should try to compress a file with gzip.
Check to see if we should try to compress a file with gzip .