function getBytes(value, name?): Uint8Array

Get a typed Uint8Array for value. If already a Uint8Array the original value is returned; if a copy is required use getBytesCopy.

Parameters

ParameterTypeDescription
valueBytesLikeThe value to convert to a Uint8Array.
name?stringThe name of the value for error context.

Returns

Uint8Array

The typed Uint8Array.

Source

utils/data.ts:70