Skip to content

Bytes.validate

Checks if the given value is Bytes.Bytes.

Imports

Named
import { Bytes } from 'ox'

Examples

import { Bytes } from 'ox'
 
Bytes.validate('0x')
false
Bytes.validate(Bytes.from([1, 2, 3]))
true

Definition

function validate(
  value: unknown,
): value is Bytes

Source: src/core/Bytes.ts

Parameters

value

  • Type: unknown

Value to check.

Return Type

true if the value is Bytes.Bytes, otherwise false.

value is Bytes