array-difference-linear
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -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", |
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
29
1706