()
| 1624 | * @since 4.0.0 |
| 1625 | */ |
| 1626 | export function decodeBase64<E extends string>(): Getter<Uint8Array, E> { |
| 1627 | return transformEffect((input, options) => |
| 1628 | Effect.mapErrorEager( |
| 1629 | Effect.fromResult(Base64.decode(input)), |
| 1630 | () => |
| 1631 | new SchemaIssue.InvalidValue( |
| 1632 | { expected: "a valid Base64 string" }, |
| 1633 | input, |
| 1634 | options |
| 1635 | ) |
| 1636 | ) |
| 1637 | ) |
| 1638 | } |
| 1639 | |
| 1640 | /** |
| 1641 | * Decodes a Base64 string to a UTF-8 `string`. |
nothing calls this directly
no test coverage detected