dump

Description
Helper function which dumps a human-readable version of a value. If the value is simple and well-formed, this also produces syntax which could be used directly in Lua source code.

Parameters:


 * — The table or other value to print.
 * — The indent field specifies a indentation string, it defaults to a tab. Use the empty string to disable indentation.

For tables this performs a recursive deep traversal. Loops (such as the table containing a reference to itself) are detected, keeping the function from looping infinitely. Values that have already been seen are printed as.

For values that cannot be readily printed in Lua syntax, another placeholder such as  or   is printed.

Example 1
Result:

Example 2
Result: