jshttp / mime-types

The ultimate javascript content-type utility.
MIT License
1.32k stars 129 forks source link

fix: remove usage of built-in `node` extname to make it edge compat #108

Closed juliusmarminge closed 1 year ago

juliusmarminge commented 1 year ago

skips the built in node module path so that you can use this package in edge functions.

not sure how sophisticated extname function is necessary - but this passes all your existing tests

also added some type defs

dougwilson commented 1 year ago

Hello, and thank you for your pull request. Unfortunately this particular change is not something we are looking to make, as evidenced by the prior closed prs of the same nature. If you are looking for a non-Node.js mime module, consider mime instead which has that support much better.