MCPcopy
hub / github.com/microsoft/SandDance / unregisterIcons

Function unregisterIcons

docs/app/js/sanddance-app.js:28070–28088  ·  view source on GitHub ↗
(iconNames)

Source from the content-addressed store, hash-verified

28068 }
28069}
28070function unregisterIcons(iconNames) {
28071 var options = _iconSettings.__options;
28072 var _loop_1 = function(iconName) {
28073 var normalizedIconName = normalizeIconName(iconName);
28074 if (_iconSettings[normalizedIconName]) delete _iconSettings[normalizedIconName];
28075 else // Warn that we are trying to delete an icon that doesn't exist
28076 if (!options.disableWarnings) (0, _utilities.warn)('The icon "' + iconName + '" tried to unregister but was not registered.');
28077 // Delete any aliases for this iconName
28078 if (_iconSettings.__remapped[normalizedIconName]) delete _iconSettings.__remapped[normalizedIconName];
28079 // Delete any items that were an alias for this iconName
28080 Object.keys(_iconSettings.__remapped).forEach(function(key) {
28081 if (_iconSettings.__remapped[key] === normalizedIconName) delete _iconSettings.__remapped[key];
28082 });
28083 };
28084 for(var _i = 0, iconNames_1 = iconNames; _i < iconNames_1.length; _i++){
28085 var iconName1 = iconNames_1[_i];
28086 _loop_1(iconName1);
28087 }
28088}
28089function registerIconAlias(iconName, mappedToName) {
28090 _iconSettings.__remapped[normalizeIconName(iconName)] = normalizeIconName(mappedToName);
28091}

Callers

nothing calls this directly

Calls 1

_loop_1Function · 0.85

Tested by

no test coverage detected