isBytes
Checks whether the value is a byte array or not.
Install
import { isBytes } from 'viem'Usage
import { isBytes } from 'viem'
isBytes(new Uint8Array([1, 69, 420]))
// true
isBytes([1, 69, 420])
// falseReturns
boolean
Returns truthy is the value is a byte array.