MCPcopy Index your code
hub / github.com/callstack/react-native-paper / getIconId

Function getIconId

src/components/Icon.tsx:43–54  ·  view source on GitHub ↗
(source: any)

Source from the content-addressed store, hash-verified

41 /\.(bmp|jpg|jpeg|png|gif|svg)$/.test(source)));
42
43const getIconId = (source: any) => {
44 if (
45 typeof source === 'object' &&
46 source !== null &&
47 Object.prototype.hasOwnProperty.call(source, 'uri') &&
48 typeof source.uri === 'string'
49 ) {
50 return source.uri;
51 }
52
53 return source;
54};
55
56export const isValidIcon = (source: any) =>
57 typeof source === 'string' ||

Callers 1

isEqualIconFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…