aboutsummaryrefslogtreecommitdiffstats
path: root/lua/inet/set.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/inet/set.lua')
-rw-r--r--lua/inet/set.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/inet/set.lua b/lua/inet/set.lua
index a353f30..a5d9056 100644
--- a/lua/inet/set.lua
+++ b/lua/inet/set.lua
@@ -1,6 +1,8 @@
local core = require 'inet.core'
+local common = require 'inet.common'
local is_inet = core.is_inet
+local get_mt = common.get_mt
local insert = table.insert
local remove = table.remove
@@ -197,4 +199,9 @@ end
M.new = new_set
+function M.is_set(t)
+ local mt = get_mt(t)
+ return mt == inet_set
+end
+
return M