'use strict';

var _Set = require('./_Set.js');
var noop = require('./noop.js');
var _setToArray = require('./_setToArray.js');

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;

/**
 * Creates a set object of `values`.
 *
 * @private
 * @param {Array} values The values to add to the set.
 * @returns {Object} Returns the new set.
 */
var createSet = !(_Set && (1 / _setToArray(new _Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  return new _Set(values);
};

module.exports = createSet;
