Skip to content

πŸ”– Lua ULID generator (Universally unique Lexicographically sortable IDentifier)

License

Notifications You must be signed in to change notification settings

Timmy-the-nobody/ULID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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)

About

πŸ”– Lua ULID generator (Universally unique Lexicographically sortable IDentifier)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages