@hashicorp/array-includes-polyfill
Advanced tools
Comparing version 1.0.2 to 1.0.3-alpha.0
@@ -9,20 +9,16 @@ 'use strict'; | ||
throw new TypeError('"this" is null or not defined'); | ||
} | ||
} // 1. Let O be ? ToObject(this value). | ||
// 1. Let O be ? ToObject(this value). | ||
var o = Object(this); | ||
// 2. Let len be ? ToLength(? Get(O, "length")). | ||
var len = o.length >>> 0; | ||
var o = Object(this); // 2. Let len be ? ToLength(? Get(O, "length")). | ||
// 3. If len is 0, return false. | ||
var len = o.length >>> 0; // 3. If len is 0, return false. | ||
if (len === 0) { | ||
return false; | ||
} | ||
// 4. Let n be ? ToInteger(fromIndex). | ||
} // 4. Let n be ? ToInteger(fromIndex). | ||
// (If fromIndex is undefined, this step produces the value 0.) | ||
var n = fromIndex | 0; | ||
// 5. If n ≥ 0, then | ||
var n = fromIndex | 0; // 5. If n ≥ 0, then | ||
// a. Let k be n. | ||
@@ -32,2 +28,3 @@ // 6. Else n < 0, | ||
// b. If k < 0, let k be 0. | ||
var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); | ||
@@ -37,5 +34,5 @@ | ||
return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y); | ||
} | ||
} // 7. Repeat, while k < len | ||
// 7. Repeat, while k < len | ||
while (k < len) { | ||
@@ -46,8 +43,9 @@ // a. Let elementK be the result of ? Get(O, ! ToString(k)). | ||
return true; | ||
} | ||
// c. Increase k by 1. | ||
} // c. Increase k by 1. | ||
k++; | ||
} | ||
} // 8. Return false | ||
// 8. Return false | ||
return false; | ||
@@ -54,0 +52,0 @@ } |
{ | ||
"name": "@hashicorp/array-includes-polyfill", | ||
"description": "a polyfill for Array.includes", | ||
"version": "1.0.2", | ||
"version": "1.0.3-alpha.0", | ||
"author": "Hashicorp - Jennifer Yip", | ||
"license": "MPL-2.0", | ||
"main": "dist", | ||
@@ -13,3 +14,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "78236aa1b7f3adda5e4e3dd1d1ba8f084e1c24dc" | ||
"gitHead": "1061cf1c0dbb3ff14c1b343d58ca855ce909e962" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
0
2081
2
70
35
3