load()
This function is part of IconSet class in Iconify Tools.
Function load() loads icon set from IconifyJSON data.
It replaces existing icon set data, so it is identical to creating new IconSet instance. If you want to merge icon sets instead, see mergeIconSets() function.
Validation
Function does not validate icon set. If you are not sure about source, you need to validate it using validateIconSet() from Iconify Utils.
Example
example.ts
ts
iconSet.load({
prefix: 'codicon',
icons: {
'add': {
body: '<g fill="currentColor"><path d="M14 7v1H8v6H7V8H1V7h6V1h1v6h6z"/></g>',
},
'chrome-maximize': {
body: '<g fill="currentColor"><path d="M3 3v10h10V3H3zm9 9H4V4h8v8z"/></g>',
},
'chrome-minimize': {
body: '<g fill="currentColor"><path d="M14 8v1H3V8h11z"/></g>',
},
},
});