Module stringify
The Stringify module provides utilities for formatting and displaying Lua tables in a more readable manner.
Returns the stringify table.
Functions
| isSimpleArray (tbl) | Checks if a table is a simple array (i.e., an array with consecutive numeric keys starting from 1). |
| format (tbl, indent, visited) | Formats a table for display, handling circular references and formatting strings and tables recursively. |
Tables
| stringify | The stringify table |
Functions
- isSimpleArray (tbl)
-
Checks if a table is a simple array (i.e., an array with consecutive numeric keys starting from 1).
Parameters:
- tbl {table} The table to check
Returns:
-
{boolean}
Whether the table is a simple array
- format (tbl, indent, visited)
-
Formats a table for display, handling circular references and formatting strings and tables recursively.
Parameters:
- tbl {table} The table to format
- indent {number} The indentation level (default is 0)
- visited {table} A table to track visited tables and detect circular references (optional)
Returns:
-
{string}
A string representation of the table