MCPcopy
hub / github.com/Kong/insomnia / baseToString

Function baseToString

packages/insomnia/bin/yarn-standalone.js:11877–11891  ·  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

11875 * @returns {string} Returns the string.
11876 */
11877 function baseToString(value) {
11878 // Exit early for strings to avoid a performance hit in some environments.
11879 if (typeof value == 'string') {
11880 return value;
11881 }
11882 if (isArray(value)) {
11883 // Recursively convert values (susceptible to call stack limits).
11884 return arrayMap(value, baseToString) + '';
11885 }
11886 if (isSymbol(value)) {
11887 return symbolToString ? symbolToString.call(value) : '';
11888 }
11889 var result = (value + '');
11890 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
11891 }
11892
11893 /**
11894 * 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