mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import baseGetTag from './baseGetTag.js';
|
||||
import toSource from './toSource.js';
|
||||
import baseGetTag from './baseGetTag.js'
|
||||
import toSource from './toSource.js'
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
const dataViewTag = '[object DataView]';
|
||||
const mapTag = '[object Map]';
|
||||
const objectTag = '[object Object]';
|
||||
const promiseTag = '[object Promise]';
|
||||
const setTag = '[object Set]';
|
||||
const weakMapTag = '[object WeakMap]';
|
||||
const dataViewTag = '[object DataView]'
|
||||
const mapTag = '[object Map]'
|
||||
const objectTag = '[object Object]'
|
||||
const promiseTag = '[object Promise]'
|
||||
const setTag = '[object Set]'
|
||||
const weakMapTag = '[object WeakMap]'
|
||||
|
||||
/** Used to detect maps, sets, and weakmaps. */
|
||||
const dataViewCtorString = toSource(DataView);
|
||||
const mapCtorString = toSource(Map);
|
||||
const promiseCtorString = toSource(Promise);
|
||||
const setCtorString = toSource(Set);
|
||||
const weakMapCtorString = toSource(WeakMap);
|
||||
const dataViewCtorString = toSource(DataView)
|
||||
const mapCtorString = toSource(Map)
|
||||
const promiseCtorString = toSource(Promise)
|
||||
const setCtorString = toSource(Set)
|
||||
const weakMapCtorString = toSource(WeakMap)
|
||||
|
||||
/**
|
||||
* Gets the `toStringTag` of `value`.
|
||||
@@ -23,7 +23,7 @@ const weakMapCtorString = toSource(WeakMap);
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
let getTag = baseGetTag;
|
||||
let getTag = baseGetTag
|
||||
|
||||
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
||||
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
@@ -32,21 +32,21 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
||||
(getTag(new Set) != setTag) ||
|
||||
(getTag(new WeakMap) != weakMapTag)) {
|
||||
getTag = value => {
|
||||
const result = baseGetTag(value);
|
||||
const Ctor = result == objectTag ? value.constructor : undefined;
|
||||
const ctorString = Ctor ? toSource(Ctor) : '';
|
||||
const result = baseGetTag(value)
|
||||
const Ctor = result == objectTag ? value.constructor : undefined
|
||||
const ctorString = Ctor ? toSource(Ctor) : ''
|
||||
|
||||
if (ctorString) {
|
||||
switch (ctorString) {
|
||||
case dataViewCtorString: return dataViewTag;
|
||||
case mapCtorString: return mapTag;
|
||||
case promiseCtorString: return promiseTag;
|
||||
case setCtorString: return setTag;
|
||||
case weakMapCtorString: return weakMapTag;
|
||||
case dataViewCtorString: return dataViewTag
|
||||
case mapCtorString: return mapTag
|
||||
case promiseCtorString: return promiseTag
|
||||
case setCtorString: return setTag
|
||||
case weakMapCtorString: return weakMapTag
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
export default getTag;
|
||||
export default getTag
|
||||
|
||||
Reference in New Issue
Block a user