MCPcopy
hub / github.com/ionic-team/ionicons / getIconMap

Function getIconMap

src/components/icon/utils.ts:6–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4let CACHED_MAP: Map<string, string>;
5
6export 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
19export const addIcons = (icons: { [name: string]: string }) => {
20 Object.keys(icons).forEach((name) => {

Callers 3

utils.spec.tsFile · 0.90
addToIconMapFunction · 0.85
getNamedUrlFunction · 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…