1.2.4 • Published 4 months ago

@saekitominaga/mime-parser v1.2.4

Weekly downloads
5
License
MIT
Repository
github
Last release
4 months ago

Parsing a MIME type

npm version test status

Examples

import MIMETypeParser from '@saekitominaga/mime-parser';

const mimeTypeParser = new MIMETypeParser('Text/HTML; Charset=utf-8');
mimeTypeParser.toString(); // 'text/html;charset=utf-8'
mimeTypeParser.getType(); // 'text'
mimeTypeParser.getSubtype(); // 'html'
mimeTypeParser.getEssence(); // 'text/html'
mimeTypeParser.getParameters(); // Map(1) { 'charset' => 'utf-8' }
mimeTypeParser.getParameter('charset'); // 'utf-8'
mimeTypeParser.getParameter('foo'); // undefined

Constructor

new MIMETypeParser(inputMimeType: string)

Parameters

Methods

1.2.4

4 months ago

1.2.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago