Jump to content

မေႃႇၵျူး:utilities/scribunto parameter key'/doc

လုၵ်ႉတီႈ ဝိၵ်ႇသျိၼ်ႇၼရီႇ မႃး

This is the documentation page for မေႃႇၵျူး:utilities/scribunto parameter key'

Takes a parameter name as an input, and returns the Scribunto-normalized form (i.e. the key which is given for that parameter in a frame.args) table. For example, "1" is normalized to 1, and " foo " is normalized to "foo". If the input is not a string, it is returned unchanged.

Strings are trimmed with Module:string/php trim, and then converted to numbers if:

  1. They are integers, with no decimals (2.0) or leading zeroes (02).
  2. They are <= 2^53 and >= -2^53.

Note: Lua integers are only accurate to 2^53 - 1, so 2^53 and -2^53 have to be specifically checked for, since Lua will evaluate 2^53 as equal to 2^53 + 1.