Skip to main content
Version: bleeding-edge 🩸

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

ReturnsNameDescription
stringDumpDumps a table into a readable text
tableShallowCopyPerforms a shallow copy of a table

Dump

Dumps a table into a readable text
local ret = NanosTable.Dump(table)

Parameters

TypeParameterDefaultDescription
tabletable Required parameter Table to dump

Returns

TypeDescription
stringthe 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

TypeParameterDefaultDescription
tabletable Required parameter The table to shallow copy

Returns

TypeDescription
tablethe copied table