Encodes a binary string into a base-64 encoded string with a URL and filename safe alphabet.
the string to encode
whether to add padding characters (=) to the end of the string (default: false)
=
false
the base-64 encoded string
import { urlEncode64 } from "@trashpanda001/helpers/string"urlEncode64("A/B+C")// "QS9CK0M"urlEncode64("A/B+C", true)// "QS9CK0M=" Copy
import { urlEncode64 } from "@trashpanda001/helpers/string"urlEncode64("A/B+C")// "QS9CK0M"urlEncode64("A/B+C", true)// "QS9CK0M="
Encodes a binary string into a base-64 encoded string with a URL and filename safe alphabet.