(file, index)
| 1 | // ---------------------------------------------------------------------- |
| 2 | |
| 3 | export default function getFileData(file, index) { |
| 4 | if (typeof file === 'string') { |
| 5 | return { |
| 6 | key: index ? `${file}-${index}` : file, |
| 7 | preview: file, |
| 8 | }; |
| 9 | } |
| 10 | |
| 11 | return { |
| 12 | key: index ? `${file.name}-${index}` : file.name, |
| 13 | name: file.name, |
| 14 | size: file.size, |
| 15 | path: file.path, |
| 16 | type: file.type, |
| 17 | preview: file.preview, |
| 18 | lastModified: file.lastModified, |
| 19 | lastModifiedDate: file.lastModifiedDate, |
| 20 | }; |
| 21 | } |
nothing calls this directly
no outgoing calls
no test coverage detected