param svg export const svgDataUrl = ( svg ) : string => `url("data:image/svg+xml,${ encodeURIComponent ( svg ) }");` ; param src export const trimSvg = ( src ) : string => src . split ( "\n" ) . map ( ( s ) => s . trim ( ) ) . filter ( ( s ) => s . length > 0 ) . join ( " " ) ;