* The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string.
(value)
| 505 | * @returns {string} Returns the string. |
| 506 | */ |
| 507 | function baseToString(value) { |
| 508 | // Exit early for strings to avoid a performance hit in some environments. |
| 509 | if (typeof value == 'string') { |
| 510 | return value; |
| 511 | } |
| 512 | if (isSymbol(value)) { |
| 513 | return symbolToString ? symbolToString.call(value) : ''; |
| 514 | } |
| 515 | const result = value + ''; |
| 516 | return result == '0' && 1 / value == -INFINITY ? '-0' : result; |
| 517 | } |
| 518 | |
| 519 | /** |
| 520 | * Casts `value` to a path array if it's not one. |