()
| 1822 | * @since 4.0.0 |
| 1823 | */ |
| 1824 | export function decodeHexString<E extends string>(): Getter<string, E> { |
| 1825 | return transformEffect((input, options) => |
| 1826 | Result.match(Hex.decodeString(input), { |
| 1827 | onFailure: () => |
| 1828 | Effect.fail( |
| 1829 | new SchemaIssue.InvalidValue( |
| 1830 | { expected: "a valid hexadecimal string" }, |
| 1831 | input, |
| 1832 | options |
| 1833 | ) |
| 1834 | ), |
| 1835 | onSuccess: Effect.succeed |
| 1836 | }) |
| 1837 | ) |
| 1838 | } |
| 1839 | |
| 1840 | /** |
| 1841 | * Encodes a present string using `encodeURIComponent`. |
nothing calls this directly
no test coverage detected