We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 013b277 commit db12267Copy full SHA for db12267
lua/cjson/util.lua
@@ -10,6 +10,11 @@ local json = require "cjson"
10
-- -1 Not an array
11
-- 0 Empty table
12
-- >0 Highest index in the array
13
+
14
+-- Provide unpack for Lua 5.3+ built without LUA_COMPAT_UNPACK
15
+local unpack = unpack
16
+if table.unpack then unpack = table.unpack end
17
18
local function is_array(table)
19
local max = 0
20
local count = 0
0 commit comments