[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/script-host](https://jsprismarine.dev/api/@jsprismarine/script-host/index.md) / [values](https://jsprismarine.dev/api/@jsprismarine/script-host/values/index.md) / ValueReader

# Class: ValueReader

Defined in: [script-host/src/values.ts:150](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L150)

Reads values out of a transfer buffer, copying every string.

## Constructors

### Constructor

> **new ValueReader**(`bytes`, `length`): `ValueReader`

Defined in: [script-host/src/values.ts:159](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L159)

#### Parameters

##### bytes

`Buffer`

The buffer's current view.

##### length

`number`

How many bytes are valid.

#### Returns

`ValueReader`

## Accessors

### done

#### Get Signature

> **get** **done**(): `boolean`

Defined in: [script-host/src/values.ts:165](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L165)

Whether every valid byte has been read.

##### Returns

`boolean`

## Methods

### list()

> **list**(): [`ScriptValue`](https://jsprismarine.dev/api/@jsprismarine/script-host/values/index.md#scriptvalue)[]

Defined in: [script-host/src/values.ts:170](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L170)

Reads a list: its count, then each value.

#### Returns

[`ScriptValue`](https://jsprismarine.dev/api/@jsprismarine/script-host/values/index.md#scriptvalue)[]

***

### string()

> **string**(): `string`

Defined in: [script-host/src/values.ts:211](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L211)

Reads one string value.

#### Returns

`string`

***

### value()

> **value**(): [`ScriptValue`](https://jsprismarine.dev/api/@jsprismarine/script-host/values/index.md#scriptvalue)

Defined in: [script-host/src/values.ts:179](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/values.ts#L179)

Reads one value.

#### Returns

[`ScriptValue`](https://jsprismarine.dev/api/@jsprismarine/script-host/values/index.md#scriptvalue)

#### Throws

When the bytes are not a value.
