• Determines the file extension's corresponding MIME type or 'application/unknown' if none match

    Parameters

    • extension: undefined | string

      a file extension

    Returns string

    the corresponding MIME type or 'application/unknown'

    getMIMETypeFromExtension('.eml') // 'message/rfc822'
    getMIMETypeFromExtension(undefined) // 'application/unknown'