Added function lume.extend(), updated README and tests

This commit is contained in:
rxi
2015-05-05 19:21:56 +01:00
parent fce4a5e5df
commit 2e00c753d8
3 changed files with 32 additions and 0 deletions

View File

@@ -183,6 +183,19 @@ function lume.clear(t)
end
function lume.extend(t, ...)
for i = 1, select("#", ...) do
local x = select(i, ...)
if x then
for k, v in pairs(x) do
t[k] = v
end
end
end
return t
end
function lume.shuffle(t)
local rtn = {}
for i = 1, #t do