> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# getBytesCopy

> **注意**: このページはまだ日本語に翻訳されていません。以下は英語の原文です。

```ts theme={null}
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

| Parameter | Type                                                  | Description                              |
| :-------- | :---------------------------------------------------- | :--------------------------------------- |
| `value`   | [`BytesLike`](/jp/sdk/content/type-aliases/BytesLike) | The value to convert to a Uint8Array.    |
| `name`?   | `string`                                              | The name of the value for error context. |

## Returns

`Uint8Array`

The typed Uint8Array.

## Source

[utils/data.ts:83](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/data.ts#L83)
