mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-25 23:24:35 +00:00
uuid: Add a time arg to ulid
This commit is contained in:
parent
04d658d601
commit
b39e295eb4
4
uuid.lua
4
uuid.lua
@ -74,8 +74,8 @@ end
|
||||
--generate an ULID using this rng at this time
|
||||
--see https://github.com/ulid/spec
|
||||
--implementation based on https://github.com/Tieske/ulid.lua
|
||||
function uuid.ulid(rng, time_func)
|
||||
return _encode_time() .. _encode_random()
|
||||
function uuid.ulid(rng, time)
|
||||
return _encode_time(time) .. _encode_random(rng)
|
||||
end
|
||||
|
||||
return uuid
|
||||
|
Loading…
Reference in New Issue
Block a user