Software /
code /
prosody
Comparison
util/import.lua @ 8389:5d866eb8f18f
util: Ignore some Lua 5.1 vs 5.2 compat things [luacheck]
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 10 Nov 2017 17:47:11 +0100 |
parent | 7183:b606a5b32e91 |
child | 8570:a4ef8cfa97bd |
comparison
equal
deleted
inserted
replaced
8387:7d61431e1aa6 | 8389:5d866eb8f18f |
---|---|
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 | 11 local unpack = table.unpack or unpack; --luacheck: ignore 113 143 |
12 local t_insert = table.insert; | 12 local t_insert = table.insert; |
13 function import(module, ...) | 13 function 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 = {}; |