(source: any)
| 27 | }; |
| 28 | |
| 29 | const isImageSource = (source: any) => |
| 30 | // source is an object with uri |
| 31 | (typeof source === 'object' && |
| 32 | source !== null && |
| 33 | Object.prototype.hasOwnProperty.call(source, 'uri') && |
| 34 | typeof source.uri === 'string') || |
| 35 | // source is a module, e.g. - require('image') |
| 36 | typeof source === 'number' || |
| 37 | // image url on web |
| 38 | (Platform.OS === 'web' && |
| 39 | typeof source === 'string' && |
| 40 | (source.startsWith('data:image') || |
| 41 | /\.(bmp|jpg|jpeg|png|gif|svg)$/.test(source))); |
| 42 | |
| 43 | const getIconId = (source: any) => { |
| 44 | if ( |
no outgoing calls
no test coverage detected
searching dependent graphs…