Urara-Blog/node_modules/.pnpm-store/v3/files/73/8f89c46a507f16d7c08ae7961f69545b44c44d9c216ba533084f27434f3169c97d1895e5c73b2e773936ddb703f6ac3a9191369c4de4b25ad1ca3b5a04cd38
2022-08-14 01:14:53 +08:00

28 lines
580 B
Text

var baseToString = require('./_baseToString');
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
module.exports = toString;