Effect CommunityEC
Effect Community2y ago
7 replies
Champ

Defining Schema for Base64url Strings

How can we define a schema for base64url string?

I see the decoding function:

/**
 * Decodes a base64 (URL) encoded `string` into a UTF-8 `string`.
 *
 * @category decoding
 * @since 2.0.0
 */
export const decodeBase64UrlString = (str: string) => Either.map(decodeBase64Url(str), (_) => Common.decoder.decode(_))


We have S.Base64Url, but its decoded type is Uint8Array not string.
Was this page helpful?