Bytes.fromArray
Converts an array of unsigned 8-bit integers into Bytes.Bytes.
Imports
Named
import { Bytes } from 'ox'Examples
import { Bytes } from 'ox'
const data = Bytes.fromArray([255, 124, 5, 4])
Uint8Array([255, 124, 5, 4])Definition
function fromArray(
value: readonly number[] | Uint8Array,
): BytesSource: src/core/Bytes.ts
Parameters
value
- Type:
readonly number[] | Uint8Array
Value to convert.
Return Type
A Bytes.Bytes instance.
Bytes

