View source for Module:Convert/helper

From The Goon Show Depository

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page.

-- This module provides some functions to prepare template parameters
-- for use with Template:Convert.
-- This module is not used by Template:Convert or Module:Convert.
local function stripToNil(text)
-- If text is a non-empty string, return its trimmed content,
-- otherwise return nothing (empty string or not a string).
if type(text) == 'string' then
return text:match('(%S.-)%s*$')
end
end
-- Remove commas and references (any strip markers) from a number.
-- First usage in Template:Infobox_UK_place/dist (June 2018)
local function cleanNumber(frame)
local args = frame.args
local text = stripToNil(args[1]) or ''
if text == '' or tonumber(text) then
return text
end
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:Convert/helper.