mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-25 18:08:03 +00:00
20 lines
501 B
JavaScript
20 lines
501 B
JavaScript
|
var Set = require('./_Set'),
|
||
|
noop = require('./noop'),
|
||
|
setToArray = require('./_setToArray');
|
||
|
|
||
|
/** 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;
|