lib/ecstatic.js
function tryServeWithBrotli(shouldTryGzip) {
      fs.stat(brotliFile, (err, stat) => {
        if (!err && stat.isFile()) {
          file = brotliFile;
          serve(stat);
        } else if (shouldTryGzip) {
          tryServeWithGzip();
        } else {
          statFile();
        }
      });
    }
function tryServeWithBrotli(shouldTryGzip) {
      fs.stat(brotliFile, (err, stat) => {
        if (!err && stat.isFile()) {
          file = brotliFile;
          serve(stat);
        } else if (shouldTryGzip) {
          tryServeWithGzip();
        } else {
          statFile();
        }
      });
    }
function tryServeWithBrotli ( shouldTryGzip ) { fs . stat ( brotliFile , ( err , stat ) => { if ( ! err && stat . isFile ( ) ) { file = brotliFile ; serve ( stat ) ; } else if ( shouldTryGzip ) { tryServeWithGzip ( ) ; } else { statFile ( ) ; } } ) ; }
serve brotli file if exists, otherwise try gzip
serve brotli file if exists otherwise try gzip