Module:Sandbox/Frietjes: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 6:
-- This function implements {{rnd}}
return math_module._precision_format(tostring(num), digits)
end
 
function p.ifexists(frame)
page = frame.args[1]
if not page then return (frame.args['no'] or '') end
if mw.title.new(page).exists then return (frame.args['yes'] or 'yes') end
return (frame.args['no'] or '')
end
 
Line 55 ⟶ 62:
function p.hasOSM(frame)
return getBestStatement(mw.wikibase.getEntityIdForCurrentPage(), 'P402') and 'yes' or 'no'
end
 
function p.chart(frame)
local chart = require('Module:Chart')['bar-chart']
return chart(frame)
end