* 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)
| 4289 | * @returns {string} Returns the string. |
| 4290 | */ |
| 4291 | function baseToString(value) { |
| 4292 | // Exit early for strings to avoid a performance hit in some environments. |
| 4293 | if (typeof value == 'string') { |
| 4294 | return value; |
| 4295 | } |
| 4296 | if (isArray(value)) { |
| 4297 | // Recursively convert values (susceptible to call stack limits). |
| 4298 | return arrayMap(value, baseToString) + ''; |
| 4299 | } |
| 4300 | if (isSymbol(value)) { |
| 4301 | return symbolToString ? symbolToString.call(value) : ''; |
| 4302 | } |
| 4303 | var result = (value + ''); |
| 4304 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; |
| 4305 | } |
| 4306 | |
| 4307 | /** |
| 4308 | * The base implementation of `_.uniqBy` without support for iteratee shorthands. |
no test coverage detected