gentics-ui-core
Version:
This is the common core framework for the Gentics CMS and Mesh UI, and other Angular applications.
10 lines (9 loc) • 439 B
TypeScript
/**
* Matches a mime type against a list of allowed/disallowed types.
* @example
* matchesMimeType('text/plain', 'text/*') // true
* matchesMimeType('image/jpeg', 'text/*') // false
* matchesMimeType('text/plain', 'text/*, image/*') // true
* matchesMimeType('image/gif', 'image/*, !image/gif') // false
*/
export declare function matchesMimeType(type: string, allowedTypes: string): boolean;