Skip to content


This function is part of Iconify Utils package.

Function convertIconSetInfo() converts and validates icon set information.

Some old icon sets might have information in legacy format, which was created before Iconify projects moved to TypeScript. This function will accept both old and new formats, will convert and validate it and will return correct IconifyInfo data.


Function has the following parameters:

  • data, unknown. Icon set information, which can be legacy object or IconifyInfo.
  • expectedPrefix, string. Optional. If set, and source object has prefix property with different value, function will throw an error. This can be used legacy information might be incorrect.

Function returns:


tsimport { convertIconSetInfo } from '@iconify/utils';

// Original data
const data = {
   name: 'Remix Icon',
   total: 2271,
   author: 'Remix Design',
   url: '',
   license: 'Apache 2.0',
   licenseURL: '',
   height: 24,
   samples: ['lock-2-line', 'mark-pen-fill', 'moon-line'],
   palette: 'Colorless',
   category: 'General',

// Convert it
const converted = convertIconSetInfo(data);

// Log result
   "name": "Remix Icon",
   "total": 2271,
   "author": {
       "name": "Remix Design",
       "url": ""
   "license": {
       "title": "Apache 2.0",
       "url": ""
   "samples": ["lock-2-line", "mark-pen-fill", "moon-line"],
   "height": 24,
   "displayHeight": 24,
   "category": "General",
   "palette": false

Released under the Apache 2.0 License.