NanosTable
A table containing useful and aux table functions.
🎒 Examples
(NanosTable.Dump) Dumps a table
local tbl = {
["my_key"] = 123,
[2] = "my_value"
}
local dump_text = NanosTable.Dump(tbl)
Console.Log(dump_text)
-- Outputs Text
--[[
{
["my_key"]: 123,
2 = "my_value"
}
--]]
🗿 Static Functions
| Returns | Name | Description | |
|---|---|---|---|
| string | Dump | Dumps a table into a readable text | |
| table | ShallowCopy | Performs a shallow copy of a table |
Dump
Dumps a table into a readable text
local ret = NanosTable.Dump(table)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| table | table | Required parameter | Table to dump |
Returns
| Type | Description |
|---|---|
| string | the table as readable text |
NanosTable.Dump Examples
Dumps a table
local tbl = {
["my_key"] = 123,
[2] = "my_value"
}
local dump_text = NanosTable.Dump(tbl)
Console.Log(dump_text)
-- Outputs Text
--[[
{
["my_key"]: 123,
2 = "my_value"
}
--]]
ShallowCopy
Performs a shallow copy of a table
local ret = NanosTable.ShallowCopy(table)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| table | table | Required parameter | The table to shallow copy |
Returns
| Type | Description |
|---|---|
| table | the copied table |