Module:Protocol version

local p = {}

-- function p.value( f ) local args = f   if f == mw.getCurrentFrame then args = require( 'Module:ProcessArgs' ).merge( true ) end local version = mw.text.trim( args[1] or '' ) local type = args.type -- load the values from the submodule local value = mw.loadData( 'Module:Pokechu22/Sandbox/Versions' )['all'][version]['protocol'] local category = '' if not value then value = '—' local title = mw.title.getCurrentTitle if not args.nocat and title.namespace == 0 and not title.isSubpage then category = '' end end return value .. category end

-- Version table function p.table( f ) local args = f   if f == mw.getCurrentFrame then args = require( 'Module:ProcessArgs' ).merge( true ) end local html = {} local grouped = mw.loadData( 'Module:Pokechu22/Sandbox/Versions' )['grouped']

for group, data in pairs(grouped) do       table.insert( html, "=== " .. group .. " ===\n" ) table.insert( html, " \n' )

return table.concat( html ) end

return p