Appearance
Checks whether the value is a hex value or not.
import { isHex } from 'viem'
import { isHex } from 'viem' isHex('0x1a4') // true isHex('0x1a4z') isHex('foo') // false
boolean
Returns truthy is the value is a hex value.