( file: File, routeConfig: ExpandedRouteConfig, )
| 56 | * @public |
| 57 | */ |
| 58 | export const isValidFileType = ( |
| 59 | file: File, |
| 60 | routeConfig: ExpandedRouteConfig, |
| 61 | ): boolean => |
| 62 | Micro.runSync( |
| 63 | matchFileType(file, objectKeys(routeConfig)).pipe( |
| 64 | Micro.map((type) => file.type.includes(type)), |
| 65 | Micro.orElseSucceed(() => false), |
| 66 | ), |
| 67 | ); |
| 68 | |
| 69 | /** |
| 70 | * Validate that a file is of a valid size given a route config |
no test coverage detected