mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
16 lines
357 B
JavaScript
16 lines
357 B
JavaScript
define(['./_Set', './noop'], function(Set, noop) {
|
|
|
|
/**
|
|
* Creates a set of `values`.
|
|
*
|
|
* @private
|
|
* @param {Array} values The values to add to the set.
|
|
* @returns {Object} Returns the new set.
|
|
*/
|
|
var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) {
|
|
return new Set(values);
|
|
};
|
|
|
|
return createSet;
|
|
});
|