[@rakh/utils](./docs/README.md) / [Exports](./docs/modules.md) / limitedArray # Class: limitedArray ## Table of contents ### Constructors - [constructor](./docs/classes/limitedArray.md#constructor) ### Properties - [\_array](./docs/classes/limitedArray.md#_array) - [\_limit](./docs/classes/limitedArray.md#_limit) ### Methods - [add](./docs/classes/limitedArray.md#add) - [get](./docs/classes/limitedArray.md#get) - [length](./docs/classes/limitedArray.md#length) - [limit](./docs/classes/limitedArray.md#limit) - [push](./docs/classes/limitedArray.md#push) - [shift](./docs/classes/limitedArray.md#shift) ## Constructors ### constructor • **new limitedArray**(`size?`) Used to construct the LimitedArray Defaults to 100 when no size is passed in #### Parameters | Name | Type | Default value | | :------ | :------ | :------ | | `size` | `number` | `100` | #### Defined in limitedArray.ts:10 ## Properties ### \_array • **\_array**: `any`[] #### Defined in limitedArray.ts:2 ___ ### \_limit • **\_limit**: `number` #### Defined in limitedArray.ts:3 ## Methods ### add ▸ **add**(`items`): `void` Bulk add an array to the array #### Parameters | Name | Type | | :------ | :------ | | `items` | `any`[] | #### Returns `void` #### Defined in limitedArray.ts:54 ___ ### get ▸ **get**(): `any`[] Return the items within the array #### Returns `any`[] #### Defined in limitedArray.ts:29 ___ ### length ▸ **length**(): `number` Returns the length of the array #### Returns `number` #### Defined in limitedArray.ts:46 ___ ### limit ▸ **limit**(`size`): `void` Limits the size of the array #### Parameters | Name | Type | | :------ | :------ | | `size` | `number` | #### Returns `void` #### Defined in limitedArray.ts:37 ___ ### push ▸ **push**(`item`): `void` Add items to the end of an array #### Parameters | Name | Type | | :------ | :------ | | `item` | `any` | #### Returns `void` #### Defined in limitedArray.ts:20 ___ ### shift ▸ **shift**(): `any` Remove an item from the beginning of an array #### Returns `any` #### Defined in limitedArray.ts:64