* 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)
| 551 | * @returns {string} Returns the string. |
| 552 | */ |
| 553 | function baseToString(value) { |
| 554 | // Exit early for strings to avoid a performance hit in some environments. |
| 555 | if (typeof value == 'string') { |
| 556 | return value; |
| 557 | } |
| 558 | if (isSymbol(value)) { |
| 559 | return symbolToString ? symbolToString.call(value) : ''; |
| 560 | } |
| 561 | var result = value + ''; |
| 562 | return result == '0' && 1 / value == -INFINITY ? '-0' : result; |
| 563 | } |
| 564 | |
| 565 | /** |
| 566 | * Casts `value` to a path array if it's not one. |