i need to base64 format but i have svg string, i want to write a function for it. i look some packages but there are no available package for working on react native and also i tried to firstly converet image just like png or jpeg after then convert to base64 but there are no available package either.

in react, it is possible cause i fount this repo but i can’t refactor it for react native

https://yoksel.github.io/url-encoder/

please help about typescipt cause i am working on typescript template for react native.