()
| 1363 | * @since 4.0.0 |
| 1364 | */ |
| 1365 | export function decodeBase64String<E extends string>(): Getter<string, E> { |
| 1366 | return transformOrFail((input, options) => |
| 1367 | Result.match(Encoding.decodeBase64String(input), { |
| 1368 | onFailure: () => |
| 1369 | Effect.fail( |
| 1370 | new SchemaIssue.InvalidValue( |
| 1371 | { expected: "a valid Base64 string" }, |
| 1372 | input, |
| 1373 | options |
| 1374 | ) |
| 1375 | ), |
| 1376 | onSuccess: Effect.succeed |
| 1377 | }) |
| 1378 | ) |
| 1379 | } |
| 1380 | |
| 1381 | /** |
| 1382 | * Decodes a URL-safe Base64 string to a `Uint8Array`. |
nothing calls this directly
no test coverage detected