valid-mimetype
v1.0.0
Published
Validate mimetype strings
Downloads
5
Maintainers
Readme
valid-mimetype
Validate mimetype strings. This module is for determining whether a string follows the mimetype string format found in IETF RFC 6838.
import * as vmt from "validate-mimetype";
vmt.isValidMimeType("application/html+xml"); // ⇒ true
vmt.isValidMimeType("application/x-7z-compressed"); // ⇒ true
vmt.isValidMimeType("audio/3gpp2"); // ⇒ true
Build & Test
npm run build
npm test
License
See the LICENSE
file for license information.