iconify/tools

Difference between iconify/tools and iconify/utils

Closed this issue · 3 comments

What is the difference between iconify/tools and iconify/utils. The descriptions in the docs sound very similar: https://docs.iconify.design/tools/

Is one newer / the preferred method? Does each have functionality that the other doesn't, and if so, what?

Utils is for reusable functions that are used in various icon components and other packages. It can be used in any environment: node, browser, deno, any closed environment (such as plugin development), anything other JavaScript environment. It includes functions for:

  • reading and parsing icon sets in JSON format
  • generating SVG from those icon sets
  • functions for validating color (used by icon picker)

There is also JSON Tools package, which is old version of Utils and is deprecated.

Tools is for converting and validating icons. It is used to generate icon sets. It works only in node, has bunch of dependencies. It includes functions for:

  • importing icons from different sources: SVG sets, Figma API (in version 2), icon fonts (in version 1, dropped in version 2).
  • validating, cleaning up, optimising contents of icons
  • exporting icons to various formats: JSON, packages, SVG

Updated documentation to make difference clearer: https://docs.iconify.design/tools/

Thanks a lot for opening this issue. If explanation is not clear enough or you'll find something else that could use a better explanation, please tell me about it.

I understand now, thanks for being so responsive and making that more clear!