Releases: jsdom/whatwg-mimetype
4.0.0
3.0.0
Node.js v12 is now the minimum supported version.
Changed the semantics of the isJavaScript()
method to allow parameters by default, like the other testing functions and matching the spec definition of JavaScript MIME type. Now you can prohibit parameters by using isJavaScript({ prohibitParameters: true })
.
2.3.0
Spec update: use HTTP whitespace instead of ASCII whitespace while parsing, per whatwg/mimesniff@126286a. In practice this means U+000C FF characters are no longer treated specially in parsing.
2.2.0
Spec update: allowed empty string parameter values, per whatwg/mimesniff@190c18a.
2.1.0
2.0.1
2.0.0
Renamed the package from "content-type-parser" to "whatwg-mimetype", as MIME type is the more general concept, and this is now implementing part of the WHATWG MIME Sniffing Standard.
Replaced the parser and serializer with the newly-specified one from whatwg/mimesniff@cc81ec4.
Overhauled the API to more or less match what is proposed in whatwg/mimesniff#43. Notably, the invariants of the MIME type model are now maintained more aggressively, and the parameters exist on a separate Map-like data structure. Also removed the isText() method, as it's much less interesting than the other two.
1.0.2
1.0.1
1.0.0
Extracted from jsdom, with the only change being adding lowercasing of type, subtype, and parameter names.