Module:Test: Difference between revisions

From Resonite Wiki
mNo edit summary
mNo edit summary
Line 5: Line 5:
  local outputsDecode = mw.text.jsonDecode( frame.args.Outputs );
  local outputsDecode = mw.text.jsonDecode( frame.args.Outputs );


  local protofluxContainer = mw.html.create( 'table' );
  protofluxContainer = mw.html.create( 'table' );
  protofluxContainer:addClass( 'infobox' );
  protofluxContainer:addClass( 'infobox' );



Revision as of 02:13, 13 January 2024

Documentation for this module may be created at Module:Test/doc

local p = {}

function p.ProtoFlux( frame )
 local inputsDecode = mw.text.jsonDecode( frame.args.Inputs );
 local outputsDecode = mw.text.jsonDecode( frame.args.Outputs );

 protofluxContainer = mw.html.create( 'table' );
 protofluxContainer:addClass( 'infobox' );

 for k,v in pairs( inputsDecode ) do
  protofluxContainer:wikitext( k .. '=' .. v );
 end
 for k,v in pairs( outputsDecode ) do
  protofluxContainer:wikitext( k .. '=' .. v );
 end
 return tostring( protofluxContainer );
end

return p