UNPKG

341 BJavaScriptView Raw
1import Set from './_Set';
2import noop from './noop';
3
4/**
5 * Creates a set of `values`.
6 *
7 * @private
8 * @param {Array} values The values to add to the set.
9 * @returns {Object} Returns the new set.
10 */
11var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) {
12 return new Set(values);
13};
14
15export default createSet;