Module:Citation/CS1/Utilities: Difference between revisions
From All Skies Encyclopaedia
imported>Trappist the monk No edit summary |
imported>Trappist the monk No edit summary |
||
Line 8: | Line 8: | ||
properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance |
properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance |
||
}; |
}; |
||
local cfg = mw.loadData ('Module:Citation/CS1/Configuration/sandbox'); |
|||
--[[--------------------------< I S _ S E T >------------------------------------------------------------------ |
--[[--------------------------< I S _ S E T >------------------------------------------------------------------ |
||
Line 19: | Line 21: | ||
end |
end |
||
return {is_set = is_set, z=z} |
return {is_set = is_set, z=z} -- return exported functions and tables |
Revision as of 18:09, 13 December 2015
{{#lst:Module:Citation/CS1/doc|header}} This page contains various functions and tables that are common to multiple of the various modules that make up Module:Citation/CS1.
{{#lst:Module:Citation/CS1/doc|module_components_table}}
local u = {}
local z = {
error_categories = {}; -- for categorizing citations that contain errors
error_ids = {};
message_tail = {};
maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work
properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance
};
local cfg = mw.loadData ('Module:Citation/CS1/Configuration/sandbox');
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.
This function is global because it is called from both this module and from Date validation
]]
function is_set( var )
return not (var == nil or var == '');
end
return {is_set = is_set, z=z} -- return exported functions and tables