UNPKG

@swaggerexpert/cookie

Version:

RFC 6265 compliant cookie parser, validator and serializer.

8 lines 314 B
import { toBase64 } from "../../../utils.mjs"; const base64urlDecoder = input => { const base64 = toBase64(input); const binaryString = atob(base64); const bytes = new Uint8Array([...binaryString].map(char => char.charCodeAt(0))); return new TextDecoder().decode(bytes); }; export default base64urlDecoder;