paweljarosz
paweljarosz/lua-immutable/immutable
Runtime immutable Lua table implementation
- GitHub: paweljarosz/lua-immutable — pinned to
v1.1- Pick a release from paweljarosz/lua-immutable releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as immutable from "immutable"
- Pick a release from paweljarosz/lua-immutable releases and add its Source code (zip) URL (or a packaged
Functions
is_immutable(table_to_check: LuaTable | Immutable): boolean
Checks if a given table table_to_check is immutable
Parameters
table_to_check:LuaTable | Immutable— @table to check if is immutable
Returns
boolean— @true if table is immutable, false otherwise
make(original_table: LuaTable | Immutable): Immutable
Makes a given table immutable, including nested tables
Parameters
original_table:LuaTable | Immutable— @table to convert
Returns
Immutable— @converted table