Table Extensions
This module contains utility functions for table operations. All functions are registered on the global table table and can be accessed as table.example(my_table).
Functions
| Name | Description |
|---|---|
| table.any_key | Returns a single unspecified key from the table. |
| table.append | Adds a list of values at the end of another. |
| table.clear | Removes all values in a table. |
| table.contains | Returns whether a table contains a specific value. |
| table.copy | Returns a shallow copy of a table. |
| table.count | Returns the number of (key, value) pairs in a table. |
| table.deserialize | Creates a table from its string representation. |
| table.deep_copy | Returns a deep copy of a table. |
| table.equals | Returns whether two tables contain the same (key, value) pairs. |
| table.index_of | Returns the index of a value within a list. |
| table.is_array | Returns whether a table is an array. |
| table.is_empty | Returns whether a table contains any key. |
| table.map | Creates a new table by applying a transformation to all values in a table. |
| table.merge | Creates a new table containing all (key, value) pairs from two tables. |
| table.overlay | Writes all the (key, value) pairs from a table into an existing table. |
| table.pop | Removes the last element of a list. |
| table.push | Adds an element at the end of a list. |
| table.serialize | Returns a string representation of a table. |