* Creates a clone of `map`. * * @private * @param {Object} map The map to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned map.
(map, isDeep, cloneFunc)
| 52273 | * @returns {Object} Returns the cloned map. |
| 52274 | */ |
| 52275 | function cloneMap(map, isDeep, cloneFunc) { |
| 52276 | var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); |
| 52277 | return arrayReduce(array, addMapEntry, new map.constructor()); |
| 52278 | } |
| 52279 | |
| 52280 | module.exports = cloneMap; |
| 52281 |
no test coverage detected