Skip to content

Latest commit

 

History

History
86 lines (51 loc) · 1.48 KB

README.md

File metadata and controls

86 lines (51 loc) · 1.48 KB

ULID

ULID

This is a very simple Lua ULID (Universally unique Lexicographically sortable IDentifier) generator

Note: This was made for nanos world™, if you plan to use it outside you'll have to make some tweaks to the library


ULID.Clear

🔸 Client
🔹 Server
Removes the ULID from the cache

@param sULID — The ULID to remove

function ULID.Clear(sULID: string)

ULID.Generate

🔸 Client
🔹 Server
Generate a random ULID

@param xData — The data to bind to the ULID, defaults to true

@return — The generated ULID

function ULID.Generate(xData?: any)
  -> string

ULID.Get

🔸 Client
🔹 Server
Return a value binded to the passed ULID

@param sULID — The ULID to search

@return — The value binded to the ULID, defaults to true

function ULID.Get(sULID: string)
  -> any

ULID.GetTable

🔸 Client
🔹 Server
Returns the ULID registry

@return — The ULID registry

function ULID.GetTable()
  -> table<string, any>

ULID.Store

🔸 Client
🔹 Server
Adds an ULID to the cache

@param sULID — The ULID to add

@param xData — The data to bind to the ULID, defaults to true

function ULID.Store(sULID: string, xData?: any)