Skip to content

isBytesLike

isBytesLike(value): value is BytesLike

Defined in: utils/bytes.ts:91

Returns true if and only if value is a valid Bytes or DataHexString Same as ethers.utils.isBytesLike

any

the value to check whether or not it matches BytesLike

value is BytesLike

whether or not the value matches BytesLike

isBytesLike([1,2,3]);
// true
isBytesLike(false);
// false
isBytesLike(new Uint8Array(1));
// true