lodash._createset
Advanced tools
Comparing version 4.0.2 to 4.0.3
24
index.js
/** | ||
* lodash 4.0.2 (Custom Build) <https://lodash.com/> | ||
* lodash (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modularize exports="npm" -o ./` | ||
@@ -10,2 +10,5 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/> | ||
/** Used as references for various `Number` constants. */ | ||
var INFINITY = 1 / 0; | ||
/** `Object#toString` result references. */ | ||
@@ -92,2 +95,19 @@ var funcTag = '[object Function]', | ||
/** | ||
* Converts `set` to an array of its values. | ||
* | ||
* @private | ||
* @param {Object} set The set to convert. | ||
* @returns {Array} Returns the values. | ||
*/ | ||
function setToArray(set) { | ||
var index = -1, | ||
result = Array(set.size); | ||
set.forEach(function(value) { | ||
result[++index] = value; | ||
}); | ||
return result; | ||
} | ||
/** Used for built-in method references. */ | ||
@@ -125,3 +145,3 @@ var objectProto = Object.prototype; | ||
*/ | ||
var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) { | ||
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { | ||
return new Set(values); | ||
@@ -128,0 +148,0 @@ }; |
{ | ||
"name": "lodash._createset", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "The internal lodash function `createSet` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash._createset v4.0.2 | ||
# lodash._createset v4.0.3 | ||
@@ -18,2 +18,2 @@ The internal [lodash](https://lodash.com/) function `createSet` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash._createset) for more details. | ||
See the [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash._createset) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10408
250