aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lua/inet/init.lua3
-rw-r--r--test/inet.lua2
2 files changed, 5 insertions, 0 deletions
diff --git a/lua/inet/init.lua b/lua/inet/init.lua
index 1bb0121..56c0eed 100644
--- a/lua/inet/init.lua
+++ b/lua/inet/init.lua
@@ -25,4 +25,7 @@ M.is = core.is_inet
M.is_set = set.is_set
M.set = set.new
+-- API version
+M.version = 1
+
return setmetatable(M, mt)
diff --git a/test/inet.lua b/test/inet.lua
index 587a0b7..26d05e3 100644
--- a/test/inet.lua
+++ b/test/inet.lua
@@ -286,6 +286,8 @@ local function misc()
assert(not inet.is(42))
assert(inet.is(inet('0.0.0.0')))
assert(inet.is(inet('::')))
+
+ assert(inet.version == 1)
end
local t = test.new()