main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
499 bytes
|
Line | |
---|
1 | import Set from './_Set.js';
|
---|
2 | import noop from './noop.js';
|
---|
3 | import setToArray from './_setToArray.js';
|
---|
4 |
|
---|
5 | /** Used as references for various `Number` constants. */
|
---|
6 | var INFINITY = 1 / 0;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Creates a set object of `values`.
|
---|
10 | *
|
---|
11 | * @private
|
---|
12 | * @param {Array} values The values to add to the set.
|
---|
13 | * @returns {Object} Returns the new set.
|
---|
14 | */
|
---|
15 | var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
---|
16 | return new Set(values);
|
---|
17 | };
|
---|
18 |
|
---|
19 | export default createSet;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.