Sift
Sift is a library for manipulating arrays. It provides a number of functions for manipulating arrays (lists), dictionaries, and sets.
Sift is comprised of a number of submodules. Each submodule provides
a number of functions for manipulating a specific type of data, and
can be accessed via their respective names within the Sift module
(e.g. Sift.Array.At()), or accessed directly (e.g. local At = require(Sift.Array.At)).
Some methods and modules also have aliases, which can are documented in the corresponding submodule/method's documentation.
See the individual submodule pages for full documentation.
The Luau types Dictionary<K, V>, Array<T> (aliased as List<T>) and Set<T> are exported from the Sift module (e.g. they can be used via Sift.Array<string>), but are also available from Sift.Types.
Types
None
Properties
Array
Sift.Array: ArrayList
AliasSift.List: ArrayDictionary
Sift.Dictionary: DictionarySet
Sift.Set: SetTypes
Sift.Types: TypesNone
Sift.None: None
Luau can't distinguish between a nil value and a non-existent value. This
constant is used to represent a non-existent value. It can be used in methods
like Array.Concat or Dictionary.Merge to remove the value from the result.
Functions
isEmpty
Sift.isEmpty(table: table--
The table to check.
) → boolean--
Whether or not the table is empty.
Checks whether or not a table is empty.
local a = {}
local b = { hello = "world" }
local value = isEmpty(a) -- true
local value = isEmpty(b) -- false
equalObjects
Sift.equalObjects(...: ...table--
The tables to compare.
) → boolean--
Whether or not the tables are equal.
Compares two or more tables to see if they are equal.
local a = { hello = "world" }
local b = { hello = "world" }
local equal = EqualObjects(a, b) -- true