Anonymous

Module:Util/tables/len/Documentation/Spec: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
no edit summary
No edit summary
No edit summary
 
Line 4: Line 4:
return {
return {
params = {"tbl"},
params = {"tbl"},
returns = "The length of the array compontent of <code>tbl</code>. Works with {{Scribunto Manual|frame.args}} and tables loaded thru {{Scribunto Manual|mw.loadData}}.",
returns = "The length of the array component of <code>tbl</code>. Unlike the <code>#</code> operator, this function works with {{Scribunto Manual|frame.args}} and tables loaded via {{Scribunto Manual|mw.loadData}}.",
cases = {
cases = {
{
{
args = {{1, 2, 3, [10] = 10}},
args = {{1, 2, 3, [10] = 10}},
expect = 3,
expect = 3,
},
{
args = {{ foo = "bar" }},
expect = 0
},
},
},
},