Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

CommonAudioTypes: string[] = ...
CommonImageTypes: string[] = ...
CommonVideoTypes: string[] = ...

Functions

  • isMedia(fileType: string): boolean
  • Check if a file is media (image or video) by its mime type

    example

    if(isMedia('image/jpg')) console.log('File is media') isMedia('video/mp4') // true isMedia('image/png') // true isMedia('application/json') // false

    Parameters

    • fileType: string

      mime type

    Returns boolean

Generated using TypeDoc