@trashpanda001/helpers
    Preparing search index...

    Function urlEncode64

    • Encodes a binary string into a base-64 encoded string with a URL and filename safe alphabet.

      Parameters

      • string: string

        the string to encode

      • padding: boolean = false

        whether to add padding characters (=) to the end of the string (default: false)

      Returns string

      the base-64 encoded string

      import { urlEncode64 } from "@trashpanda001/helpers/string"

      urlEncode64("A/B+C")
      // "QS9CK0M"
      urlEncode64("A/B+C", true)
      // "QS9CK0M="