Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iconify/utils

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iconify/utils

Common functions for working with Iconify icon sets used by various packages.

  • 2.0.0-beta.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
389K
decreased by-37.93%
Maintainers
1
Weekly downloads
 
Created

What is @iconify/utils?

@iconify/utils is a utility package for working with Iconify icons. It provides various tools for managing, customizing, and converting icon data, making it easier to integrate and manipulate icons in your projects.

What are @iconify/utils's main functionalities?

Icon Data Management

This feature allows you to retrieve icon data for a specific icon. The `getIconData` function takes an icon name as an argument and returns the corresponding icon data.

const { getIconData } = require('@iconify/utils');
const iconData = getIconData('mdi:home');
console.log(iconData);

Icon Customization

This feature allows you to customize SVG content by replacing IDs to avoid conflicts. The `replaceIDs` function takes SVG content as an argument and returns the modified SVG content with unique IDs.

const { replaceIDs } = require('@iconify/utils');
const svgContent = '<svg><path id="icon" d="..."/></svg>';
const customizedSVG = replaceIDs(svgContent);
console.log(customizedSVG);

Icon Conversion

This feature allows you to convert icon data to SVG format. The `iconToSVG` function takes icon data as an argument and returns the corresponding SVG content.

const { iconToSVG } = require('@iconify/utils');
const iconData = { body: '<path d="..."/>', width: 24, height: 24 };
const svg = iconToSVG(iconData);
console.log(svg);

Other packages similar to @iconify/utils

FAQs

Package last updated on 02 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc