mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-17 14:28:25 +00:00
* Adjust typescript types * adjust types * fix types in all helper files * Fix types * Migrate js files to ts files * Refactor to TS files * Rename extentions * Adjust imports * Fix builds * Update lockfile * Fix last typescript migration * Fix entry path @lucide/outline-svg * Fix types * add checkout step * format files * Format files
19 lines
533 B
TypeScript
19 lines
533 B
TypeScript
/* eslint-disable import/prefer-default-export */
|
|
import { hash } from './hash.ts';
|
|
|
|
/**
|
|
* Generate Hashed string based on name and attributes
|
|
*
|
|
* @param {object} seed
|
|
* @param {string} seed.name A name, for example an icon name
|
|
* @param {object} seed.attributes An object of SVGElement Attrbutes
|
|
* @returns {string} A hashed string of 6 characters
|
|
*/
|
|
export const generateHashedKey = ({
|
|
name,
|
|
attributes,
|
|
}: {
|
|
name: string;
|
|
attributes: Record<string, unknown>;
|
|
}): string => hash(JSON.stringify([name, attributes]));
|