mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Port MIME module to TypeScript
This commit is contained in:
@@ -1 +1,14 @@
|
||||
export type MIMEType = string & { _mimeTypeBrand: any };
|
||||
|
||||
|
||||
export const isVideo = (value: MIMEType): boolean =>
|
||||
value.startsWith('video/') && value !== 'video/wmv';
|
||||
|
||||
export const isImage = (value: MIMEType): boolean =>
|
||||
value.startsWith('image/') && value !== 'image/tiff';
|
||||
|
||||
export const isAudio = (value: MIMEType): boolean =>
|
||||
value.startsWith('audio/');
|
||||
|
||||
export const isJPEG = (value: MIMEType): boolean =>
|
||||
value === 'image/jpeg';
|
||||
|
||||
Reference in New Issue
Block a user