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

array-hyper-unique

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-hyper-unique - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

index.js

@@ -20,9 +20,14 @@ "use strict";

if (options.overwrite) {
arr.forEach(function (val, index, array) {
let i = array.findIndex(a => checker(a, val, array, arr));
if (i !== index) {
arr.splice(i, 1);
let index = 0;
while (index in arr) {
let val = arr[index];
let i = arr.findIndex(a => checker(a, val, arr, arr));
if (i != index) {
let j = Math.max(index, i);
arr.splice(j, 1);
}
return i === index;
});
else {
index++;
}
}
return arr;

@@ -29,0 +34,0 @@ }

@@ -38,16 +38,22 @@ /**

{
// @ts-ignore
arr.forEach(function (val, index, array)
let index = 0;
while (index in arr)
{
// @ts-ignore
let i = array.findIndex(a => checker(a, val, array, arr));
let val = arr[index];
if (i !== index)
let i = arr.findIndex(a => checker(a, val, arr, arr));
if (i != index)
{
arr.splice(i, 1);
let j = Math.max(index, i);
arr.splice(j, 1);
}
else
{
index++;
}
}
return i === index;
});
return arr;

@@ -54,0 +60,0 @@ }

{
"name": "array-hyper-unique",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get unique values of an array. Really, like deeply unique.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -10,2 +10,3 @@ # array-hyper-unique

3. also add option control
4. see [_data.ts](test/_data.ts) and [test.test.ts](test/test.test.ts)

@@ -12,0 +13,0 @@ ## demo

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