mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 20:55:50 +00:00
Uses Stylua to format all existing Lua files, and adds a CI check in `lint` to pin this improvement. Excludes formatting dependencies, of course.
34 lines
512 B
Lua
34 lines
512 B
Lua
--[[
|
|
This is a placeholder module waiting for Cryo to become available.
|
|
]]
|
|
|
|
local None = newproxy(true)
|
|
getmetatable(None).__tostring = function()
|
|
return "None"
|
|
end
|
|
|
|
local function merge(...)
|
|
local output = {}
|
|
|
|
for i = 1, select("#", ...) do
|
|
local source = select(i, ...)
|
|
|
|
if source ~= nil then
|
|
for key, value in pairs(source) do
|
|
if value == None then
|
|
output[key] = nil
|
|
else
|
|
output[key] = value
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
return output
|
|
end
|
|
|
|
return {
|
|
None = None,
|
|
merge = merge,
|
|
}
|