Created
December 21, 2022 19:08
-
-
Save howmanysmall/4f992252d7fae5c4f74a736747b1f960 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local NilDependency = newproxy(true) | |
local Metatable = getmetatable(NilDependency) | |
function Metatable:__tostring() | |
return "NilDependency" | |
end | |
local function GetDependencies(...) | |
local Length = select("#", ...) | |
local Dependencies = table.create(Length) | |
for Index = 1, Length do | |
local Dependency = select(Index, ...) | |
Dependencies[Index] = if Dependency == nil then NilDependency else Dependency | |
end | |
return Dependencies | |
end | |
return GetDependencies |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment