1.0.0 • Published 5 years ago

valid-mimetype v1.0.0

Weekly downloads
10
License
MIT
Repository
github
Last release
5 years ago

valid-mimetype

npm GitHub repository license

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.