You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mime.charset.lookup -> deleted (this has never added all that much value)
mime.define -> similar, but now throws if there's an extension conflict. Takes a force param to suppress the error and override.
mime.load -> deleted (Relic of when node-mime straight from apache's mime.types file, introduced dependencies on path and fs that have been problematic as this module has moved into new spaces (Electron, react-native, etc)
Also of interest ...
require('mime/Mime') gets you the Mime class for creating new instances
new Mime(require('mime/types/standard')) will get you a light version of the module with only "standard" types (i.e. types not on a .vnd, .x, or .prs facet)
The text was updated successfully, but these errors were encountered:
With v2, I wanted to revisit the mime API which, frankly, has never felt great to me. So to that end I'm looking for feedback on https://github.com/broofa/node-mime/blob/v2/Mime.js
Notable differences:
force
param to suppress the error and override.path
andfs
that have been problematic as this module has moved into new spaces (Electron, react-native, etc)Also of interest ...
The text was updated successfully, but these errors were encountered: