Files
xahau.js/packages/xahau-binary-codec/test/utils.ts
Denis Angell 9544e1794e xahau-patch
2025-03-14 15:08:35 +01:00

10 lines
238 B
TypeScript

import { hexToBytes } from '@xrplf/isomorphic/utils'
export function hexOnly(hex: string): string {
return hex.replace(/[^a-fA-F0-9]/g, '')
}
export function parseHexOnly(hex: string): Uint8Array {
return hexToBytes(hexOnly(hex))
}