mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Bump to v4.17.0.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
define(['./_addSetEntry', './_arrayReduce', './_setToArray'], function(addSetEntry, arrayReduce, setToArray) {
|
||||
|
||||
/** Used to compose bitmasks for cloning. */
|
||||
var CLONE_DEEP_FLAG = 1;
|
||||
|
||||
/**
|
||||
* Creates a clone of `set`.
|
||||
*
|
||||
@@ -10,7 +13,7 @@ define(['./_addSetEntry', './_arrayReduce', './_setToArray'], function(addSetEnt
|
||||
* @returns {Object} Returns the cloned set.
|
||||
*/
|
||||
function cloneSet(set, isDeep, cloneFunc) {
|
||||
var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
|
||||
var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
|
||||
return arrayReduce(array, addSetEntry, new set.constructor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user