UNPKG

custom-ident

Version:
26 lines 841 B
type Value = string | number | undefined | boolean; type RecordValue = Record<string, any>; type ArrayValue = Array<Value> | ReadonlyArray<Value>; type Arguments = Array<ArrayValue | RecordValue | Value>; export declare class CustomIdentError extends Error { constructor(message: string); } /** * Turns a list of values into a CSS <custom-ident>. * Escapes invalid characters. * * @warning Spaces are mapped to hyphens. * * @example * ```ts * import { customIdent } from "custom-ident"; * * const result = customIdent("my", "custom", "ident"); * console.log(result); // "my-custom-ident" * * @param args - The values to be concatenated into a custom-ident. * @returns A string representing the custom-ident. */ export declare function customIdent(...args: Arguments): string; export {}; //# sourceMappingURL=index.d.ts.map