Disk
Here is the top level content of the Disk library:
local Disk = require('@pkg/luau-disk')
local Array = Disk.Array
local Map = Disk.Map
local WeakMap = Disk.WeapMap
type Set<T> = Disk.Set<T>
Array
local Array = Disk.Array
For functions that operates on arrays (or related to arrays): Array documentation
Map
local Map = Disk.Map
For functions that operates on maps (or related to maps): Map documentation
Set
local Set = Disk.Set
fromArray
Creates a new Set from an array of values.
local result = Set.fromArray({ "a", "b", "c" })
-- result is { a = true, b = true, c = true }
WeakMap
Create a new empty weak map.
local value = Disk.WeakMap()
WeakMap can be called on an existing map to turn it into a weak map:
local value = Disk.WeakMap({ [player] = data })