()
| 1476 | * @see {@link encodeHex} for the inverse operation |
| 1477 | * |
| 1478 | * @category decoding |
| 1479 | * @since 4.0.0 |
| 1480 | */ |
| 1481 | export function decodeHex<E extends string>(): Getter<Uint8Array, E> { |
| 1482 | return transformOrFail((input, options) => |
| 1483 | Result.match(Encoding.decodeHex(input), { |
| 1484 | onFailure: () => |
| 1485 | Effect.fail( |
| 1486 | new SchemaIssue.InvalidValue( |
| 1487 | { expected: "a valid hexadecimal string" }, |
| 1488 | input, |
| 1489 | options |
| 1490 | ) |
| 1491 | ), |
| 1492 | onSuccess: Effect.succeed |
| 1493 | }) |
nothing calls this directly
no test coverage detected
searching dependent graphs…