From 85c0bd6f57e9f59fffaddb6c7b13e20df4947206 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 13 Mar 2018 18:56:11 +0100 Subject: [PATCH] scripts/check_site.lua: add table_keys() helper --- scripts/check_site.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/check_site.lua b/scripts/check_site.lua index 63e3d0e5..b5bcd5f2 100644 --- a/scripts/check_site.lua +++ b/scripts/check_site.lua @@ -70,6 +70,14 @@ local function array_to_string(array) return '[' .. table.concat(array, ', ') .. ']' end +function table_keys(tbl) + local keys = {} + for k, _ in pairs(tbl) do + keys[#keys + 1] = k + end + return keys +end + local loadpath