10 lines
506 B
Markdown
10 lines
506 B
Markdown
![]() |
Excerpt from [the DustJS tutorial](https://github.com/linkedin/dustjs/wiki/Dust-Tutorial#size_keyxxx___size_helper_Available_in_Dust_V11_release):
|
||
|
|
||
|
Array - number of elements, [1,2,3,4] has size=4
|
||
|
String - length of the string, "abcdef" has size=6
|
||
|
Object - Number of properties in the object, {a:4, b:8, c:15, d:16} has size=4
|
||
|
Number - Value of the number, 23 has size 23 and 3.14 has size 3.14
|
||
|
Undefined, 0, empty string - zero
|
||
|
Any other value - length after conversion to string
|
||
|
|