inspect
Interact with tables
Always loved this library, it's been very helpful, and I find myself always requiring it. I figured why not integrate it directly into the software. If it's useful to me it's likely useful to some of you out there. Thank you: https://github.com/kikito/inspect.lua/tree/master
Functions:
Inspect
inspect(table: value, table: options)Parameters:
value(any) The value to inspect.options(table, optional) Controls formatting and processing.depth(number) Maximum depth to display nested tables (default:math.huge).newline(string) String used for new lines (default:"\n").indent(string) Indentation string per nesting level (default:" ").process(function) A function to preprocess items before printing.
Returns: The formatted string representation.
Example:
local t = {1, 2, {3, 4, 5}}
print(inspect(t))Output:
{ 1, 2, { 3, 4, 5 } }Last updated