mirror of
https://github.com/BlackMATov/evolved.lua.git
synced 2025-12-13 11:38:15 +07:00
compat table.pack
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
---@class evolved.compat
|
||||
local compat = {}
|
||||
|
||||
compat.unpack = unpack or table.unpack
|
||||
compat.pack = table.pack or function(...)
|
||||
return { n = select('#', ...), ... }
|
||||
end
|
||||
|
||||
compat.unpack = table.unpack or function(list, i, j)
|
||||
return unpack(list, i, j)
|
||||
end
|
||||
|
||||
return compat
|
||||
|
||||
Reference in New Issue
Block a user