Module:Author initials

require('strict') local getArgs = require('Module:Arguments').getArgs local p = {}

function p.main(frame) local args = getArgs(frame) return p._main(args) end

function p._main(args) local str = ""

local initials = args['initials'] or "" mw.ustring.gsub(initials, '[^A-Z]', '') local data = args['data']

local authors = mw.loadData('Module:Author initials/' .. data) local author = authors[initials] or ""

if author and initials then str =  .. initials ..  else str =  .. 'Category:' .. 'Pages calling author intitials with errors' ..  end return str end

return p