MCPcopy Create free account
hub / github.com/RubyLouvre/anu / cloneSet

Function cloneSet

test/babel.js:52328–52331  ·  view source on GitHub ↗

* Creates a clone of `set`. * * @private * @param {Object} set The set to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned set.

(set, isDeep, cloneFunc)

Source from the content-addressed store, hash-verified

52326 * @returns {Object} Returns the cloned set.
52327 */
52328 function cloneSet(set, isDeep, cloneFunc) {
52329 var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
52330 return arrayReduce(array, addSetEntry, new set.constructor());
52331 }
52332
52333 module.exports = cloneSet;
52334

Callers 1

initCloneByTagFunction · 0.85

Calls 2

setToArrayFunction · 0.85
arrayReduceFunction · 0.85

Tested by

no test coverage detected