mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 14:14:36 +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
|
--generate an ULID using this rng at this time
|
||||||
--see https://github.com/ulid/spec
|
--see https://github.com/ulid/spec
|
||||||
--implementation based on https://github.com/Tieske/ulid.lua
|
--implementation based on https://github.com/Tieske/ulid.lua
|
||||||
function uuid.ulid(rng, time_func)
|
function uuid.ulid(rng, time)
|
||||||
return _encode_time() .. _encode_random()
|
return _encode_time(time) .. _encode_random(rng)
|
||||||
end
|
end
|
||||||
|
|
||||||
return uuid
|
return uuid
|
||||||
|
Loading…
Reference in New Issue
Block a user