decode
import { decode } from "https://raw.githubusercontent.com/timonson/djwt/master/mod.ts";
Takes a jwt
and returns a 3-tuple [unknown, unknown, Uint8Array]
if the
jwt has a valid serialization. Otherwise it throws an Error
. This function
does not verify the digital signature.
function decode<PayloadType extends Payload | unknown = unknown>(jwt: string): [unknown, PayloadType, Uint8Array];