Skip to main content

Table

This item only works when running on the client. Client

A table of utility functions for working with Tables that can be used to speed up the process of writing repository scripts for client objects.

Functions​

merge​

Table.merge(
itemA: any,
itemB: any?,
...: any
) → any

Merges the given tables.

Splice​

Table.Splice(
item: {T},
min: number,
max: number
) → {T}

Splices the given table, returning a copy of the table that only contains the indices from min to max.

Size​

Table.Size(item: {[unknown]: unknown}) → number

Returns the amount of indices in the table.

Compare​

Table.Compare(
itemA: any,
itemB: any,
ignoreMetatable: boolean?
) → boolean

Compares itemA and itemB and returns whether they are exact matches of each other. If ignoreMetatable is set, metatables will be ignored in this check.

FlipValuesIndices​

Table.FlipValuesIndices(item: {[I]: V}) → {[V]: I}

Flips all indices of the given table, rearranging it from back to front.

Show raw api
{
    "functions": [
        {
            "name": "merge",
            "desc": "Merges the given tables.",
            "params": [
                {
                    "name": "itemA",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "itemB",
                    "desc": "",
                    "lua_type": "any?"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 29,
                "path": "mirror/Kit.Utility.Table.luau"
            }
        },
        {
            "name": "Splice",
            "desc": "Splices the given table, returning a copy of the table that only contains\nthe indices from `min` to `max`.",
            "params": [
                {
                    "name": "item",
                    "desc": "",
                    "lua_type": "{ T }"
                },
                {
                    "name": "min",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "max",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ T }\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 47,
                "path": "mirror/Kit.Utility.Table.luau"
            }
        },
        {
            "name": "Size",
            "desc": "Returns the amount of indices in the table.",
            "params": [
                {
                    "name": "item",
                    "desc": "",
                    "lua_type": "{ [unknown]: unknown }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 56,
                "path": "mirror/Kit.Utility.Table.luau"
            }
        },
        {
            "name": "Compare",
            "desc": "Compares `itemA` and `itemB` and returns whether they are exact matches of\neach other. If `ignoreMetatable` is set, metatables will be ignored in this check.",
            "params": [
                {
                    "name": "itemA",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "itemB",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "ignoreMetatable",
                    "desc": "",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 71,
                "path": "mirror/Kit.Utility.Table.luau"
            }
        },
        {
            "name": "FlipValuesIndices",
            "desc": "Flips all indices of the given table, rearranging it from back to front.",
            "params": [
                {
                    "name": "item",
                    "desc": "",
                    "lua_type": "{ [I]: V }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ [V]: I }\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 110,
                "path": "mirror/Kit.Utility.Table.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Table",
    "desc": "A table of utility functions for working with Tables that can be used to speed up the process of writing repository scripts for client objects.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 10,
        "path": "mirror/Kit.Utility.Table.luau"
    }
}