Skip to content

isBytes

isBytes(value): value is Bytes

Defined in: utils/bytes.ts:137

Returns true if and only if value is a valid Bytes Same as ethers.utils.isBytes

Parameters

value

any

the value to check whether or not it matches Bytes

Returns

value is Bytes

whether or not the value matches Bytes

Examples

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