valid-mimetype
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i valid-mimetype

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.64 kB

Total Files

6

Last publish

Collaborators

  • mgthomas99