Module:Template input utils: Difference between revisions
m todo |
add empty function for param normalizing |
||
| Line 10: | Line 10: | ||
-- Library module for common operations with handling template input. | -- Library module for common operations with handling template input. | ||
-- - Numbered <anything> to table extract args and places them into a table. | -- - Numbered <anything> to table extract args and places them into a table. | ||
-- Normalize params to snake case; anything close enough to snake case is | |||
-- converted to snake case: | |||
-- - PascalCase -> pascal_case | |||
-- - camelCase -> camel_case | |||
-- - ALL_CAPS -> all_caps | |||
-- - TRAIN-CASE -> train_case | |||
-- - kebab-case -> kebab_case | |||
-- - Whatever-This-Case-Is -> whatever_this_case_is | |||
-- - lowercase, UPPERCASE -> cannot be converted properly (lowercase, uppercase) | |||
function p.normalize_params(args) | |||
end | |||
-- Extracts numbered args (from frame.args) and stores them into one table. | -- Extracts numbered args (from frame.args) and stores them into one table. | ||