Files
lodash/_cloneSet.js
John-David Dalton 8166b65853 Bump to v4.6.0.
2016-02-29 23:38:21 -08:00

16 lines
394 B
JavaScript

define(['./_addSetEntry', './_arrayReduce', './_setToArray'], function(addSetEntry, arrayReduce, setToArray) {
/**
* Creates a clone of `set`.
*
* @private
* @param {Object} set The set to clone.
* @returns {Object} Returns the cloned set.
*/
function cloneSet(set) {
return arrayReduce(setToArray(set), addSetEntry, new set.constructor);
}
return cloneSet;
});