Socket
Socket
Sign inDemoInstall

array-differ

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-differ - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

index.d.ts

8

index.js
'use strict';
module.exports = (arr, ...values) => {
const arrayDiffer = (array, ...values) => {
const rest = new Set([].concat(...values));
return arr.filter(x => !rest.has(x));
return array.filter(x => !rest.has(x));
};
module.exports = arrayDiffer;
module.exports.default = arrayDiffer;
{
"name": "array-differ",
"version": "2.0.3",
"description": "Create an array with values that are present in the first input array but not additional ones",
"license": "MIT",
"repository": "sindresorhus/array-differ",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"array",
"difference",
"diff",
"differ",
"filter",
"exclude"
],
"devDependencies": {
"ava": "*",
"xo": "*"
},
"xo": {
"esnext": true
}
"name": "array-differ",
"version": "2.1.0",
"description": "Create an array with values that are present in the first input array but not additional ones",
"license": "MIT",
"repository": "sindresorhus/array-differ",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava && tsd-check"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"array",
"difference",
"diff",
"differ",
"filter",
"exclude"
],
"devDependencies": {
"ava": "^1.2.1",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
}
}

@@ -9,3 +9,3 @@ # array-differ [![Build Status](https://travis-ci.org/sindresorhus/array-differ.svg?branch=master)](https://travis-ci.org/sindresorhus/array-differ)

```
$ npm install --save array-differ
$ npm install array-differ
```

@@ -25,3 +25,3 @@

### arrayDiffer(input, values, [values, ...])
### arrayDiffer(input, ...values)

@@ -32,7 +32,7 @@ Returns a new array.

Type: `array`
Type: `unknown[]`
#### values
Type: `array`
Type: `unknown[]`

@@ -39,0 +39,0 @@ Arrays of values to exclude.

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