aboutsummaryrefslogtreecommitdiffstats
path: root/lua/inet/common.lua
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@2e8.dk>2019-07-18 17:42:31 +0000
committerAsbjørn Sloth Tønnesen <ast@2e8.dk>2019-07-18 17:42:31 +0000
commite9d84b53e7c54f84da64967faf36c8b2791579f4 (patch)
tree077c6d41d59402a929aba22ba8510047a96205d5 /lua/inet/common.lua
parent54251356a23468136f6226134b0f8524a6ae3523 (diff)
downloadlua-inet-e9d84b53e7c54f84da64967faf36c8b2791579f4.tar.gz
lua-inet-e9d84b53e7c54f84da64967faf36c8b2791579f4.tar.xz
lua-inet-e9d84b53e7c54f84da64967faf36c8b2791579f4.zip
add inet.is_set()
Signed-off-by: Asbjørn Sloth Tønnesen <ast@2e8.dk>
Diffstat (limited to 'lua/inet/common.lua')
-rw-r--r--lua/inet/common.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/lua/inet/common.lua b/lua/inet/common.lua
new file mode 100644
index 0000000..6a84a13
--- /dev/null
+++ b/lua/inet/common.lua
@@ -0,0 +1,8 @@
+local M = {}
+
+function M.get_mt(t)
+ if type(t) ~= 'table' then return nil end
+ return getmetatable(t)
+end
+
+return M