validateMediaType
validateMediaType(
mediaType
):boolean
Defined in: astrobase/src/media-types/media-types.ts:61
Validates media type ASCII bytes (minus the NUL terminator byte). Valid media types use only alphanumeric characters and dashes, with one forward slash separator, and cannot be longer than 127 characters.
Parameters
Section titled “Parameters”mediaType
Section titled “mediaType”Uint8Array
The media type ASCII bytes.
Returns
Section titled “Returns”boolean
true
if the media type is valid. false
otherwise.