Skip to content

basalt / http/src / mediaTypeOf

Function: mediaTypeOf() ​

> mediaTypeOf(header): string

Defined in: http/src/media-type.ts:18

The media type of a Content-Type header — lower-cased, parameters and surrounding whitespace removed. '' when the header is absent.

Parameters ​

string | readonly string[] | null | undefined

Returns ​

string

Released under the MIT License.