()
| 1662 | * @since 4.0.0 |
| 1663 | */ |
| 1664 | export function decodeBase64String<E extends string>(): Getter<string, E> { |
| 1665 | return transformEffect((input, options) => |
| 1666 | Result.match(Base64.decodeString(input), { |
| 1667 | onFailure: () => |
| 1668 | Effect.fail( |
| 1669 | new SchemaIssue.InvalidValue( |
| 1670 | { expected: "a valid Base64 string" }, |
| 1671 | input, |
| 1672 | options |
| 1673 | ) |
| 1674 | ), |
| 1675 | onSuccess: Effect.succeed |
| 1676 | }) |
| 1677 | ) |
| 1678 | } |
| 1679 | |
| 1680 | /** |
| 1681 | * Decodes a URL-safe Base64 string to a `Uint8Array`. |
nothing calls this directly
no test coverage detected