Software /
code /
prosody
Comparison
util/import.lua @ 10411:db2a06b9ff98
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 16 Nov 2019 16:52:31 +0100 |
parent | 9692:affcbccc1dff |
child | 12589:39ae08180c81 |
comparison
equal
deleted
inserted
replaced
10410:659b577f280c | 10411:db2a06b9ff98 |
---|---|
6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
7 -- | 7 -- |
8 | 8 |
9 | 9 |
10 | 10 |
11 local unpack = table.unpack or unpack; --luacheck: ignore 113 143 | 11 local unpack = table.unpack or unpack; --luacheck: ignore 113 |
12 local t_insert = table.insert; | 12 local t_insert = table.insert; |
13 function _G.import(module, ...) | 13 function _G.import(module, ...) |
14 local m = package.loaded[module] or require(module); | 14 local m = package.loaded[module] or require(module); |
15 if type(m) == "table" and ... then | 15 if type(m) == "table" and ... then |
16 local ret = {}; | 16 local ret = {}; |