()
| 1327 | * @since 4.0.0 |
| 1328 | */ |
| 1329 | export function decodeBase64<E extends string>(): Getter<Uint8Array, E> { |
| 1330 | return transformOrFail((input, options) => |
| 1331 | Effect.mapErrorEager( |
| 1332 | Effect.fromResult(Encoding.decodeBase64(input)), |
| 1333 | () => |
| 1334 | new SchemaIssue.InvalidValue( |
| 1335 | { expected: "a valid Base64 string" }, |
| 1336 | input, |
| 1337 | options |
| 1338 | ) |
| 1339 | ) |
| 1340 | ) |
| 1341 | } |
| 1342 | |
| 1343 | /** |
| 1344 | * Decodes a Base64 string to a UTF-8 `string`. |
nothing calls this directly
no test coverage detected