(config?: ExpandedRouteConfig)
| 71 | */ |
| 72 | |
| 73 | export const generatePermittedFileTypes = (config?: ExpandedRouteConfig) => { |
| 74 | const fileTypes = config ? objectKeys(config) : []; |
| 75 | |
| 76 | const maxFileCount = config |
| 77 | ? Object.values(config).map((v) => v.maxFileCount) |
| 78 | : []; |
| 79 | |
| 80 | return { fileTypes, multiple: maxFileCount.some((v) => v && v > 1) }; |
| 81 | }; |
| 82 | |
| 83 | export const capitalizeStart = (str: string) => { |
| 84 | return str.charAt(0).toUpperCase() + str.slice(1); |
no test coverage detected