IDs

The IDs library provides unique identifier generation.

Side: Shared

Functions

CreateUniqueId

Generates a unique string ID that doesn’t exist in the given table.

local id = Bridge.Ids.CreateUniqueId(existingTable, prefix)
-- Returns: string
ParameterTypeDescription
existingTabletableTable of existing IDs to avoid collisions
prefixstringOptional prefix for the ID

RandomNumber

Generates a random number string of a given length that doesn’t exist in the table.

local num = Bridge.Ids.RandomNumber(existingTable, length)
-- Returns: number
ParameterTypeDescription
existingTabletableTable of existing numbers to avoid collisions
lengthnumberNumber of digits