Module:PrintAllArgs

From Caves of Qud Wiki
Revision as of 15:17, 15 April 2021 by Teamtoto (talk | contribs) (Created page with "local p = {} function p.main(frame) local args = frame:getParent().args local tbl = {} for k, v in pairs(args) do tbl[#tbl+1] = k tbl[#tbl+1] = v end return...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Taken from here.


local p = {}

function p.main(frame)
  local args = frame:getParent().args
  local tbl = {}
  for k, v in pairs(args) do
    tbl[#tbl+1] = k
    tbl[#tbl+1] = v
  end
  return table.concat(tbl, ', ')
end

return p