mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-12-03 16:59:42 +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
16 lines
324 B
TypeScript
16 lines
324 B
TypeScript
/* eslint-disable import/prefer-default-export */
|
|
/**
|
|
* Minifies SVG
|
|
*
|
|
* @param {string} string
|
|
* @returns string
|
|
*/
|
|
export function minifySvg(string: string): string {
|
|
return string
|
|
? string
|
|
.replace(/>[\r\n ]+</g, '><')
|
|
.replace(/(<.*?>)|\s+/g, (m, $1) => $1 || ' ')
|
|
.trim()
|
|
: '';
|
|
}
|