From 5cca28fabc179ef3fddbbe01bd93772a06b3fb7b Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sun, 31 Jan 2016 14:23:44 -0800 Subject: [PATCH] feat(util): add array.Append helper --- frontend/util.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/util.lua b/frontend/util.lua index 89d65975d..61b017933 100644 --- a/frontend/util.lua +++ b/frontend/util.lua @@ -73,4 +73,11 @@ function util.tableSize(T) return count end +-- append all elements from t2 into t1 +function util.arrayAppend(t1, t2) + for _,v in ipairs(t2) do + table.insert(t1, v) + end +end + return util