()
| 1402 | * @since 4.0.0 |
| 1403 | */ |
| 1404 | export function decodeBase64Url<E extends string>(): Getter<Uint8Array, E> { |
| 1405 | return transformOrFail((input, options) => |
| 1406 | Result.match(Encoding.decodeBase64Url(input), { |
| 1407 | onFailure: () => |
| 1408 | Effect.fail( |
| 1409 | new SchemaIssue.InvalidValue( |
| 1410 | { expected: "a valid Base64Url string" }, |
| 1411 | input, |
| 1412 | options |
| 1413 | ) |
| 1414 | ), |
| 1415 | onSuccess: Effect.succeed |
| 1416 | }) |
| 1417 | ) |
| 1418 | } |
| 1419 | |
| 1420 | /** |
| 1421 | * Decodes a URL-safe Base64 string to a UTF-8 `string`. |
nothing calls this directly
no test coverage detected