MCPcopy Index your code
hub / github.com/vercel/hyper / baseToString

Function baseToString

bin/yarn-standalone.js:11966–11980  ·  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

11964 * @returns {string} Returns the string.
11965 */
11966 function baseToString(value) {
11967 // Exit early for strings to avoid a performance hit in some environments.
11968 if (typeof value == 'string') {
11969 return value;
11970 }
11971 if (isArray(value)) {
11972 // Recursively convert values (susceptible to call stack limits).
11973 return arrayMap(value, baseToString) + '';
11974 }
11975 if (isSymbol(value)) {
11976 return symbolToString ? symbolToString.call(value) : '';
11977 }
11978 var result = (value + '');
11979 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
11980 }
11981
11982 /**
11983 * The base implementation of `_.uniqBy` without support for iteratee shorthands.

Callers 10

createMathOperationFunction · 0.85
createPaddingFunction · 0.85
toStringFunction · 0.85
endsWithFunction · 0.85
splitFunction · 0.85
startsWithFunction · 0.85
trimFunction · 0.85
trimEndFunction · 0.85
trimStartFunction · 0.85
truncateFunction · 0.85

Calls 3

isArrayFunction · 0.85
arrayMapFunction · 0.85
isSymbolFunction · 0.85

Tested by

no test coverage detected