Skip to content

Commit 6645a4a

Browse files
committed
support openresty's table.clone
1 parent a28318f commit 6645a4a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

nattlua/other/shallow_copy.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
local ok, clone = pcall(require, "table.clone")
2+
3+
if ok then return clone end
4+
15
local function shallow_copy(tbl)
26
local copy = {}
37

0 commit comments

Comments
 (0)