# table: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/table

## Functions

### table.contains

```lua
containsValue = table.contains(table, [value])
```

Returns true if any value in the table compares equal to the specified value.

Arguments:
- `table`: table. The table to search.
- `value`: any, may be nil. The value for which to search.

Returns:
- `containsValue`: bool. True if any entry in the table has the specified value.

### table.count

```lua
count = table.count(table)
```

Returns the number of entries in the table.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `table`: table. The table whose entries will be counted.

Returns:
- `count`: number. The number of entries in the table.

### table.create

```lua
table = table.create(arraySizeHint, [nodeSizeHint])
```

Creates an empty table with storage preallocated for the specified number of array and non-array entries.

Arguments:
- `arraySizeHint`: number. The number of array entries for which to preallocate storage.
- `nodeSizeHint`: number, default 0. The number of non-array entries for which to preallocate storage.

Returns:
- `table`: table

### table.indexof

```lua
index = table.indexof(table, [value])
```

Returns the first integer index whose value compares equal to the specified value, searching consecutively from index 1 until the first nil value.

Arguments:
- `table`: table. The table to search.
- `value`: any, may be nil. The value for which to search.

Returns:
- `index`: number, may be nil. The first matching index, or nil if no match is found.

### table.freeze

```lua
frozen = table.freeze(table)
```

Marks a supplied table as frozen, preventing any modifications to its contents, or replacement of its metatable. If the table has a pre-existing metatable with a '__newindex' table or function, assignments will pass through without raising errors. For tainted code, only tables created by the same addon making this function call are permitted to be frozen.

Arguments:
- `table`: table. The table to freeze.

Returns:
- `frozen`: table. The supplied table, passed through.

### table.keys

```lua
keys = table.keys(table)
```

Returns an array containing the keys of the specified table.

Arguments:
- `table`: table. The table whose keys will be returned.

Returns:
- `keys`: any. An array containing the table's keys. The order of the returned keys is unspecified.

### table.getcountinfo

```lua
numEntries, numPositiveIntegerKeys, maxPositiveIntegerKey = table.getcountinfo(table)
```

Returns detailed information about the number and distribution of entries in the table.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `table`: table. The table to inspect.

Returns:
- `numEntries`: number. The total number of entries in the table.
- `numPositiveIntegerKeys`: number. The number of entries with positive integral keys.
- `maxPositiveIntegerKey`: number. The largest positive integral key in the table, or zero if no such keys were found.

### table.values

```lua
values = table.values(table)
```

Returns an array containing the values of the specified table.

Arguments:
- `table`: table. The table whose values will be returned.

Returns:
- `values`: any. An array containing the table's values. The order of the returned values is unspecified.

### table.isempty

```lua
empty = table.isempty(table)
```

Returns true if the table contains no entries.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `table`: table

Returns:
- `empty`: bool. True if the table contains no entries; otherwise false.

### table.isfrozen

```lua
frozen = table.isfrozen(table)
```

Returns true if a table has been marked as frozen.

Arguments:
- `table`: table. The table to inspect.

Returns:
- `frozen`: bool. True if the table has been made read-only; otherwise false.

### table.removeunordered

```lua
value = table.removeunordered(table, [index])
```

Removes the value at the specified integer index by replacing it with the last value in the array and shortening the array by one element. The order of values in the array is not preserved.

Arguments:
- `table`: table. The table from which to remove a value.
- `index`: number, may be nil. The integer index of the value to remove. If omitted, the last value is removed.

Returns:
- `value`: any, may be nil. The removed value, or nil if the index is outside the array bounds.

### table.removevalue

```lua
removedCount = table.removevalue(table, [value])
```

Removes all values equal to the specified value from the array portion of a table.

Arguments:
- `table`: table. The table from which to remove values.
- `value`: any, may be nil. The value to remove.

Returns:
- `removedCount`: number. The number of values removed.

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
