Skip to main content
MIMEType.prototype.subtype - util - Node documentation
property MIMEType.prototype.subtype

Usage in Deno

import { MIMEType } from "node:util";

Gets and sets the subtype portion of the MIME.

import { MIMEType } from 'node:util';

const myMIME = new MIMEType('text/ecmascript');
console.log(myMIME.subtype);
// Prints: ecmascript
myMIME.subtype = 'javascript';
console.log(myMIME.subtype);
// Prints: javascript
console.log(String(myMIME));
// Prints: text/javascript

Type

string
Back to top