mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import arrayMap from './arrayMap.js';
|
||||
import isSymbol from '../isSymbol.js';
|
||||
import arrayMap from './arrayMap.js'
|
||||
import isSymbol from '../isSymbol.js'
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
const INFINITY = 1 / 0;
|
||||
const INFINITY = 1 / 0
|
||||
|
||||
/** Used to convert symbols to primitives and strings. */
|
||||
const symbolProto = Symbol ? Symbol.prototype : undefined;
|
||||
const symbolToString = symbolProto ? symbolProto.toString : undefined;
|
||||
const symbolProto = Symbol ? Symbol.prototype : undefined
|
||||
const symbolToString = symbolProto ? symbolProto.toString : undefined
|
||||
|
||||
/**
|
||||
* The base implementation of `toString` which doesn't convert nullish
|
||||
@@ -19,17 +19,17 @@ const symbolToString = symbolProto ? symbolProto.toString : undefined;
|
||||
function baseToString(value) {
|
||||
// Exit early for strings to avoid a performance hit in some environments.
|
||||
if (typeof value == 'string') {
|
||||
return value;
|
||||
return value
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
// Recursively convert values (susceptible to call stack limits).
|
||||
return `${ arrayMap(value, baseToString) }`;
|
||||
return `${ arrayMap(value, baseToString) }`
|
||||
}
|
||||
if (isSymbol(value)) {
|
||||
return symbolToString ? symbolToString.call(value) : '';
|
||||
return symbolToString ? symbolToString.call(value) : ''
|
||||
}
|
||||
const result = `${ value }`;
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
||||
const result = `${ value }`
|
||||
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result
|
||||
}
|
||||
|
||||
export default baseToString;
|
||||
export default baseToString
|
||||
|
||||
Reference in New Issue
Block a user