Skip to content

@halone/sdk / mimeMatches

Function: mimeMatches() ​

ts
function mimeMatches(pattern, mimeType): boolean;

Whether [mimeType] matches a pattern such as image/* or video/mp4.

Parameters ​

pattern ​

string

mimeType ​

string | null

Returns ​

boolean

Released under the MIT License.