Helper to return the length value of an object, this will return the value
of the "length" property. Generally used to return the length of a string or array.
Since
0.4.2
Example
getLength(""); // returns 0 getLength("Hello World"); // returns 11 getLength([]); // returns 0; getLength([0, 1, 2, 3]); // returns 4; getLength({ length:42}); // returns 42 getLength({ length: () =>53; }); // returns the function that if called would return 53
Helper to return the length value of an object, this will return the value of the "length" property. Generally used to return the length of a string or array.
Since
0.4.2
Example