duster/js/test_cases/helpers_size/README.md
2020-06-14 12:54:03 -04:00

506 B

Excerpt from the DustJS tutorial:

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