()
| 1440 | * @since 4.0.0 |
| 1441 | */ |
| 1442 | export function decodeBase64UrlString<E extends string>(): Getter<string, E> { |
| 1443 | return transformOrFail((input, options) => |
| 1444 | Result.match(Encoding.decodeBase64UrlString(input), { |
| 1445 | onFailure: () => |
| 1446 | Effect.fail( |
| 1447 | new SchemaIssue.InvalidValue( |
| 1448 | { expected: "a valid Base64Url string" }, |
| 1449 | input, |
| 1450 | options |
| 1451 | ) |
| 1452 | ), |
| 1453 | onSuccess: Effect.succeed |
| 1454 | }) |
| 1455 | ) |
| 1456 | } |
| 1457 | |
| 1458 | /** |
| 1459 | * Decodes a hexadecimal string to a `Uint8Array`. |
nothing calls this directly
no test coverage detected