Encodes a string into a base-64 encoded string.
the string to encode
whether to add padding characters (=) to the end of the string (default: false)
=
false
the base-64 encoded string
import { encode64 } from "@trashpanda001/helpers/string"encode64("a")// "YQ"encode64("a", true)// "YQ==" Copy
import { encode64 } from "@trashpanda001/helpers/string"encode64("a")// "YQ"encode64("a", true)// "YQ=="
Encodes a string into a base-64 encoded string.