Show raw api
{
"functions": [
{
"name": "Has",
"desc": "Returns true if the Dictionary has the key, otherwise returns false.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "key",
"desc": "The key to search for.",
"lua_type": "string"
}
],
"returns": [
{
"desc": "True if the Dictionary has the key, otherwise false.",
"lua_type": "boolean"
}
],
"function_type": "static",
"tags": [
"evaluate"
],
"source": {
"line": 1264,
"path": "src/init.lua"
}
},
{
"name": "Keys",
"desc": "Returns a List of all the keys in the Dictionary. The List is sorted alphabetically ascending.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
}
],
"returns": [
{
"desc": "The List of keys.",
"lua_type": "List"
}
],
"function_type": "static",
"tags": [
"evaluate"
],
"source": {
"line": 1280,
"path": "src/init.lua"
}
},
{
"name": "Values",
"desc": "Returns a List of all the values in the Dictionary. The List is sorted alphabetically ascending.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
}
],
"returns": [
{
"desc": "The List of values.",
"lua_type": "List"
}
],
"function_type": "static",
"tags": [
"evaluate"
],
"source": {
"line": 1304,
"path": "src/init.lua"
}
},
{
"name": "Defaults",
"desc": "Returns a new Dictionary with default values set for any keys that don't exist in the original\nDictionary. If a key already exists in the original Dictionary, the value will not be changed.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "defaults",
"desc": "The dictionary of default values.",
"lua_type": "Dictionary | {[string]: any}"
}
],
"returns": [
{
"desc": "The new Dictionary with default values set.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1332,
"path": "src/init.lua"
}
},
{
"name": "Merge",
"desc": "Returns a new Dictionary with all the key-value pairs from the second Dictionary merged into the\nfirst. If a key exists in both Dictionaries, the value from the second Dictionary will be used.\n\nThis function is similar to `Defaults`, but will overwrite existing values.",
"params": [
{
"name": "firstDictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "secondDictionary",
"desc": "",
"lua_type": "Dictionary | {[string]: any}"
}
],
"returns": [
{
"desc": "The new Dictionary with the key-value pairs merged.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1360,
"path": "src/init.lua"
}
},
{
"name": "Pick",
"desc": "Returns a new Dictionary with only the keys specified in the keys. If a key does not exist in\nthe original Dictionary, it will be ignored.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "keys",
"desc": "The list of keys to pick.",
"lua_type": "List | {string}"
}
],
"returns": [
{
"desc": "The new Dictionary with only the picked keys.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1384,
"path": "src/init.lua"
}
},
{
"name": "Omit",
"desc": "Returns a new Dictionary with all the keys specified in the keys removed. If a key does not\nexist in the original Dictionary, it will be ignored.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "keys",
"desc": "The list of keys to omit.",
"lua_type": "List | {string}"
}
],
"returns": [
{
"desc": "The new Dictionary with the omitted keys.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1410,
"path": "src/init.lua"
}
},
{
"name": "FilterKeys",
"desc": "Returns a new Dictionary with only the keys that pass the predicate.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "predicate",
"desc": "A function that takes a key returns a boolean.",
"lua_type": "(string) -> boolean"
}
],
"returns": [
{
"desc": "The new Dictionary with only the keys that pass the predicate.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1433,
"path": "src/init.lua"
}
},
{
"name": "FilterValues",
"desc": "Returns a new Dictionary with only the values that pass the predicate.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "predicate",
"desc": "A function that takes a value and its key, and returns a boolean.",
"lua_type": "(any, string) -> boolean"
}
],
"returns": [
{
"desc": "The new Dictionary with only the values that pass the predicate.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1458,
"path": "src/init.lua"
}
},
{
"name": "Invert",
"desc": "Returns a new Dictionary with keys and values swapped. If there are duplicate values, the last\nvalue (when keys are ordered ascending) will be used.\n\nOnly Dictionaries with string values can be inverted. If a value is not a string, it will either\nbe ignored or an error will be thrown, depending on the strict parameter.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "strict",
"desc": "If true, an error will be thrown if a value is not a string. If false, non-string values will be ignored. Defaults to false.",
"lua_type": "boolean | nil"
}
],
"returns": [
{
"desc": "The new Dictionary with keys and values swapped.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1487,
"path": "src/init.lua"
}
},
{
"name": "Unset",
"desc": "Returns a new Dictionary with the specified key removed. If the key does not exist in the\noriginal Dictionary, the original Dictionary will be returned.",
"params": [
{
"name": "dictionary",
"desc": "",
"lua_type": "Dictionary"
},
{
"name": "key",
"desc": "The key to remove.",
"lua_type": "string"
}
],
"returns": [
{
"desc": "The new Dictionary with the key removed.",
"lua_type": "Dictionary"
}
],
"function_type": "static",
"tags": [
"manipulate"
],
"source": {
"line": 1520,
"path": "src/init.lua"
}
}
],
"properties": [],
"types": [],
"name": "Dictionary",
"desc": "A module containing data methods for evaluating and manipulating a [Dictionary] — an immutable\ntable of key-value pairs.\n\nAlso inherits all shared methods from [Immutable](/api/Immutable).",
"source": {
"line": 1869,
"path": "src/init.lua"
}
}