aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticommon.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--apt-panopticommon.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua
index b1f39d7..8a18c4b 100644
--- a/apt-panopticommon.lua
+++ b/apt-panopticommon.lua
@@ -334,6 +334,20 @@ dumpTableSub = function (table, space)
334 return r 334 return r
335end 335end
336 336
337
338APT.allpairs = function(tbl, func)
339 for k, v in pairs(tbl) do
340 if 'table' == type(v) then
341 for i, w in pairs(v) do
342 func(i, w, k, v)
343 end
344 else
345 func(k, v)
346 end
347 end
348end
349
350
337APT.search = function(t, s) 351APT.search = function(t, s)
338 for i, v in pairs(t) do 352 for i, v in pairs(t) do
339 if v == s then return true end 353 if v == s then return true end