Files

12 lines
284 B
TypeScript
Raw Permalink Normal View History

const base64SVG = (svgContents: string) =>
2024-01-07 15:59:19 +01:00
Buffer.from(
svgContents
.replace('\n', '')
.replace(
'stroke="currentColor"',
'stroke="#000" style="background-color: #fff; border-radius: 2px"',
),
).toString('base64');
export default base64SVG;