Build/Utils/forEach.lua
Reece 615bcb53b9 Initial commit
Publish a collection of boilerplate and an additional json parser.
This meta build chain as-is should replace a lot of the premake5.lua in the AuroraEngine repo
2021-05-20 13:56:44 +01:00

12 lines
213 B
Lua

function forEach(xd, cb, ...)
if (not xd) then
return
end
if type(xd) == "table" then
for k, v in pairs(xd) do
cb(v, ...)
end
else
cb(xd)
end
end