🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@acrool/icon-symbols

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acrool/icon-symbols

Merge svg into svg symbols, and unpack svg symbols into individual svg

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

Acrool Icon Symbols

Merge svg into svg symbols, and unpack svg symbols into individual svg

NPM npm npm

npm downloads npm

Features

  • Merge svg into svg symbols
  • unpack svg symbols into individual svg
  • Parse SVG content

Install

yarn add @acrool/icon-symbols

Use

import {decodeSvgPaths, decodeSymbols} from '@acrool/icon-symbols';

const fileContent = await fs.readFileSync(filePath);
const svg = decodeSvgPaths(fileContent.toString());

const symbols = decodeSymbols(fileContent.toString());

const newId = await this.iconSymbolService.create({
    code: file.filename.replace(/[ -]/g,'_').replace(/.svg$/,''),
    viewBox: svg.viewBox,
    content: svg.paths.join(''),
    iconDepotId,
    creatorId: currentMember.id,
});

Document

License

MIT Š Acrool & Imagine

Keywords

typescript

FAQs

Package last updated on 30 Apr 2025

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