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

array-difference-linear

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-difference-linear - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

7

index.js

@@ -1,8 +0,7 @@

var assert = require('assert');
module.exports = function(a, b){
assert(Array.isArray(a) && Array.isArray(b), "Both items passed must be of type Array");
if(!(Array.isArray(a) && Array.isArray(b))){
throw new Error("Both items passed must be of type Array");
}
const bSet = new Set(b);
return a.filter((x) => !bSet.has(x));
};
{
"name": "array-difference-linear",
"version": "1.0.5",
"version": "1.0.6",
"description": "Given array a and array b, returns a - b",

@@ -5,0 +5,0 @@ "main": "index.js",

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