Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support evaluation by extension #18

Open
timtucker-dte opened this issue Sep 27, 2019 · 1 comment
Open

Support evaluation by extension #18

timtucker-dte opened this issue Sep 27, 2019 · 1 comment
Labels

Comments

@timtucker-dte
Copy link

Data from mime-db also includes extensions -- would it make sense to have a second method that evaluates if a file is compressible based on its extension?

Looking for a common source of truth for decisions on whether or not to pre-compress files as part of our build process.

@dougwilson
Copy link
Contributor

Sure, it can be added, but I think an issue with that is that typically an extension can refer to several different media types, some of which could differ in their compressibility. We'd need to provide some kind of mechanism to either resolve that case or maybe just always return undefined if a given extension refers to several different media types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants