diff options
author | Kim Alvefur <zash@zash.se> | 2023-06-10 12:14:12 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-06-10 12:14:12 +0200 |
commit | cbed7dfdf503b8d56de4ae5ed86e32bfc4e8e60e (patch) | |
tree | 0271eb2a6559dc0b37883c8c18286065ffb001ae /util | |
parent | e4d5c1539653bf3e618618b06aed0180332a1dbf (diff) | |
download | prosody-cbed7dfdf503b8d56de4ae5ed86e32bfc4e8e60e.tar.gz prosody-cbed7dfdf503b8d56de4ae5ed86e32bfc4e8e60e.zip |
util.array: Expose new() on module table
For consistency with other utils.
Consistency is good.
Diffstat (limited to 'util')
-rw-r--r-- | util/array.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/array.lua b/util/array.lua index c33a5ef1..5461882a 100644 --- a/util/array.lua +++ b/util/array.lua @@ -35,6 +35,8 @@ local function new_array(self, t, _s, _var) return setmetatable(t or {}, array_mt); end +array.new = new_array; + function array_mt.__add(a1, a2) local res = new_array(); return res:append(a1):append(a2); |