UNPKG

vite-awesome-svg-loader

Version:

A universal Vite SVG loader. Imports SVGs as source code, base64 and data URI. Preserves stroke width. Replaces colors with currentColor or custom colors. Creates SVG sprites. Optimizes SVGs.

24 lines (23 loc) 665 B
import { MaybeArray } from './types'; /** * Converts value to an array: * * 1. If value is already an array, returns it as-is. * 1. Otherwise wraps it in array: `[value]` * * @example * * toArray(["apples", "oranges"]); // ["apples", "oranges"] * toArray(["apples"]); // ["apples"] * toArray("apples"); // ["apples"] * * @param value Value * @returns Value as an array */ export declare function toArray<T>(value: MaybeArray<T>): T[]; /** * Transforms string in `camelCase` or `PascalCase` into `kebab-case` * @param str String in `camelCase` * @returns String in `kebab-case` */ export declare function camelCaseToKebabCase(str: string): string;