Check if a file is media (image or video) by its mime type
if(isMedia('image/jpg')) console.log('File is media') isMedia('video/mp4') // true isMedia('image/png') // true isMedia('application/json') // false
mime type
Generated using TypeDoc
Check if a file is media (image or video) by its mime type
if(isMedia('image/jpg')) console.log('File is media') isMedia('video/mp4') // true isMedia('image/png') // true isMedia('application/json') // false