Skip to main content
Module

x/djwt/deps.ts>encodeBase64Url

Create and verify JSON Web Tokens (JWT) with Deno or the browser.
Very Popular
Latest
function encodeBase64Url
import { encodeBase64Url } from "https://deno.land/x/djwt@v3.0.2/deps.ts";

Convert data into a base64url-encoded string.

Examples

Example 1

import { encodeBase64Url } from "https://deno.land/std@0.223.0/encoding/base64url.ts";

encodeBase64Url(new TextEncoder().encode("foobar")); // "Zm9vYmFy"

Parameters

data: ArrayBuffer | Uint8Array | string

Returns

string