()
| 4 | let CACHED_MAP: Map<string, string>; |
| 5 | |
| 6 | export const getIconMap = (): Map<string, string> => { |
| 7 | if (typeof window === 'undefined') { |
| 8 | return new Map(); |
| 9 | } else { |
| 10 | if (!CACHED_MAP) { |
| 11 | const win = window as any; |
| 12 | win.Ionicons = win.Ionicons || {}; |
| 13 | CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map(); |
| 14 | } |
| 15 | return CACHED_MAP; |
| 16 | } |
| 17 | }; |
| 18 | |
| 19 | export const addIcons = (icons: { [name: string]: string }) => { |
| 20 | Object.keys(icons).forEach((name) => { |
no outgoing calls
no test coverage detected
searching dependent graphs…