MCPcopy Create free account
hub / github.com/Lemoncode/fonk / baseToString

Function baseToString

src/helpers/set.js:553–563  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

551 * @returns {string} Returns the string.
552 */
553function 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.

Callers 1

toStringFunction · 0.70

Calls 1

isSymbolFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…