UNPKG

viem

Version:

TypeScript Interface for Ethereum

8 lines 262 B
export function isHex(value, { strict = true } = {}) { if (!value) return false; if (typeof value !== 'string') return false; return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x'); } //# sourceMappingURL=isHex.js.map