Skip to content

Commit

Permalink
refactor: rename re
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 17, 2022
1 parent 4492656 commit dab3822
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ function isTextMime(mimeType: string) {
return /text|javascript|json|xml/.test(mimeType);
}

const compressibleMimeTypesRegex = /atom|css|eot|htc|html|ico|js|json|mjs|otf|rss|svg|text|ttf|webmanifest|xml/
const COMPRESSIBLE_MIMES_RE = /atom|css|eot|htc|html|ico|js|json|mjs|otf|rss|svg|text|ttf|webmanifest|xml/

function isCompressableMime(mimeType: string) {
return compressibleMimeTypesRegex.test(mimeType);
return COMPRESSIBLE_MIMES_RE.test(mimeType);
}

0 comments on commit dab3822

Please sign in to comment.