mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-26 07:05:49 +00:00
10 lines
238 B
TypeScript
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))
|
|
}
|