Converts value to a string if it's not one. An empty string is returned for null and undefined values. The sign of -0 is preserved.
value
null
undefined
-0
The value to process.
Returns the string.
_.toString(null);// => ''_.toString(-0);// => '-0'_.toString([1, 2, 3]);// => '1,2,3' Copy
_.toString(null);// => ''_.toString(-0);// => '-0'_.toString([1, 2, 3]);// => '1,2,3'
Converts
value
to a string if it's not one. An empty string is returned fornull
andundefined
values. The sign of-0
is preserved.