I am writting helper cli utility for myself. I need to write a function
base64 :: String -> String. It simply base64 encodes a string. Both input output should be strings no ArrayBuffers or anything.
First I tried to use
import Data.ArrayBuffer.ArrayBuffer as AB import Data.Base64 (encodeBase64, runBase64) base64 :: String -> String base64 = AB.fromString >>> encodeBase64 >>> runBase64
purescript-base64-codec does not seems to be in latest package set (I am using spago).
Looking for alternative I wanted to do purescript alternative of
Node.Buffer.fromString here returns
Effect String. I could rewrite my code so that I can use that but there just has to be way how to implement that base64 function as pure.
Thanks for your ideas!