Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -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