()
| 1517 | * @since 4.0.0 |
| 1518 | */ |
| 1519 | export function decodeHexString<E extends string>(): Getter<string, E> { |
| 1520 | return transformOrFail((input, options) => |
| 1521 | Result.match(Encoding.decodeHexString(input), { |
| 1522 | onFailure: () => |
| 1523 | Effect.fail( |
| 1524 | new SchemaIssue.InvalidValue( |
| 1525 | { expected: "a valid hexadecimal string" }, |
| 1526 | input, |
| 1527 | options |
| 1528 | ) |
| 1529 | ), |
| 1530 | onSuccess: Effect.succeed |
| 1531 | }) |
| 1532 | ) |
| 1533 | } |
| 1534 | |
| 1535 | /** |
| 1536 | * Encodes a present string using `encodeURIComponent`. |
nothing calls this directly
no test coverage detected