Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hashicorp/array-includes-polyfill

Package Overview
Dependencies
Maintainers
13
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashicorp/array-includes-polyfill - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3-alpha.0

32

dist/index.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc