Module:Sandbox/trappist the monk/pgsize

--

local function pgsize (frame) local pagename = frame.args[1]; local method = frame.args[2]; if '1' == method then return mw.getContentLanguage:formatNum(mw.title.new(pagename):getContent:len); elseif '2' == method then return frame:preprocess (''); elseif '3' == method then return frame:callParserFunction ({name = 'PAGESIZE', args = {pagename}}); else return ' unknown method ' end end

return { pgsize = pgsize, }