New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@cardog-icons/core

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardog-icons/core

Core functionality for Cardog Icons - SVG optimization and processing

latest
npmnpm
Version
1.2.0
Version published
Weekly downloads
876
-26.32%
Maintainers
1
Weekly downloads
 
Created
Source

@cardog-icons/core

Core functionality for SVG optimization and processing in the Cardog Icons library.

Features

  • SVG optimization using SVGO
  • Utilities for batch processing SVG files
  • Handling of brand names and acronyms
  • PascalCase conversion for component names

Installation

npm install @cardog-icons/core
# or
yarn add @cardog-icons/core
# or
pnpm add @cardog-icons/core

Usage

Optimizing SVGs

import { optimizeSvg, batchOptimizeSvgs } from "@cardog-icons/core";
import path from "path";

// Optimize a single SVG
await optimizeSvg("./path/to/input.svg", "./path/to/output.svg", {
  precision: 2,
  removeIds: true,
});

// Batch optimize multiple SVGs
const svgFiles = ["file1.svg", "file2.svg", "file3.svg"].map((file) =>
  path.resolve("./path/to/svgs", file)
);

await batchOptimizeSvgs(
  svgFiles,
  "./path/to/output",
  { precision: 2 },
  10 // batch size
);

Utility Functions

import {
  toPascalCase,
  processBrandName,
  findSvgFiles,
  ensureDirectoryExists,
} from "@cardog-icons/core";

// Convert a filename to PascalCase
const componentName = toPascalCase("bmw_logo");
// Result: "BMWLogo"

// Process a brand name (preserving acronyms)
const brandName = processBrandName("BMW Group");
// Result: "BMWGroup"

// Find all SVG files in a directory
const svgFiles = await findSvgFiles("./path/to/svgs");

// Ensure a directory exists
ensureDirectoryExists("./path/to/output");

License

MIT © Cardog

Keywords

icons

FAQs

Package last updated on 14 Mar 2026

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