mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Apply let/const transform.
This commit is contained in:
@@ -3,7 +3,7 @@ import arrayReduce from './_arrayReduce.js';
|
||||
import mapToArray from './_mapToArray.js';
|
||||
|
||||
/** Used to compose bitmasks for cloning. */
|
||||
var CLONE_DEEP_FLAG = 1;
|
||||
const CLONE_DEEP_FLAG = 1;
|
||||
|
||||
/**
|
||||
* Creates a clone of `map`.
|
||||
@@ -15,7 +15,7 @@ var CLONE_DEEP_FLAG = 1;
|
||||
* @returns {Object} Returns the cloned map.
|
||||
*/
|
||||
function cloneMap(map, isDeep, cloneFunc) {
|
||||
var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
|
||||
const array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
|
||||
return arrayReduce(array, addMapEntry, new map.constructor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user