Module:Sandbox/Johnuniq/ip explained

-- Try catching error from from merge proposal at-- Wikipedia:Templates_for_discussion/Log/2018_June_19#Module:IP-- See results on talk page.

local IP = require('Module:IP')local IPAddress = IP.IPAddress

local function main(frame) local results = for i, ipstr in ipairs do local success, ip = pcall(IPAddress.new, ipstr) table.insert(results, '*"' .. ipstr .. '" is ' .. (success and (ip:isIPv4 and 'IPv4' or 'IPv6') or 'invalid') ) end return table.concat(results, '\n')end

return