Files
shields/lib/svg-helpers.js
chris48s b624179b8d get the tests passing on windows (#8350)
* run the core tests on windows

* fix glob with windows path seperator

* always use slash when slicing serviceClass matches

..and add comment explaining why we need to do this

* strip line endings (+ any other whitspace) before base64 encoding

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-08-29 19:58:10 +00:00

8 lines
143 B
JavaScript

function svg2base64(svg) {
return `data:image/svg+xml;base64,${Buffer.from(svg.trim()).toString(
'base64'
)}`
}
export { svg2base64 }