Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/b64/types/base64.d.ts>base64.validate

Base64 and base64url to string or arraybuffer, and back. Works in Node, Deno or browser.
Latest
function base64.validate
import { base64 } from "https://deno.land/x/b64@1.1.28/types/base64.d.ts";
const { validate } = base64;

Function to validate base64

Parameters

encoded: string
  • Base64 or Base64url encoded data
optional
urlMode: boolean
  • If set to true, base64url will be expected

Returns

boolean
  • Valid base64/base64url?