function getBytesCopy(value, name?): Uint8Array

Get a typed Uint8Array for value, creating a copy if necessary to prevent any modifications of the returned value from being reflected elsewhere.

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:86