Build/Utils/forEach.lua
Reece 630939c6ac [+] JSON -> noLink
[*] Most actions can now be json objects. Evaluating lua should be the last thing we want to do from a json file
[+] Added isArray
[*] Update language to C++20 across all modules
[*] Various improvements
[*] Various bug fixes
2021-06-03 14:00:02 +01:00

12 lines
218 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