I'm implementing a Figma plugin, and I need to encode a line of text in base 64. I've found that I can implement that function with
I've tried
Buffer.from('STRING').toString('base64')
but Buffer is not recognized in @figma/plugin-typings
This project is not a Node.js project but a Figma plugin, so I wonder if there's another way to implement this or a package that is available for Typescript.
Use base64encode
You would have to convert the string to Uint8Array first though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With