mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
21 lines
572 B
Lua
Executable File
21 lines
572 B
Lua
Executable File
|
|
require("advancedLua")
|
|
local serialization = {}
|
|
|
|
------------------------------------------------- Public methods -----------------------------------------------------------------
|
|
|
|
function serialization.serialize(variable, ...)
|
|
local variableType = type(variable)
|
|
if variableType == "table" then
|
|
return table.serialize(variable, ...)
|
|
else
|
|
return tostring(variable)
|
|
end
|
|
end
|
|
|
|
serialization.unserialize = table.unserialize
|
|
|
|
----------------------------------------------------------------------------------------------------------------------
|
|
|
|
return serialization
|