@ethereumjs/util / isHexString
isHexString(
value
,length?
):value is `0x${string}`
Defined in: packages/util/src/internal.ts:36
Returns a boolean on whether or not the the input starts with ‘0x’ and matches the optional length
string
the string input value
number
the optional length of the hex string in bytes
value is `0x${string}`
Whether or not the string is a valid PrefixedHexString matching the optional length