https://github.com/xotic750/array-difference-x
Creates an array of array values not included in the other given arrays.
https://github.com/xotic750/array-difference-x
array browser difference javascript nodejs
Last synced: about 1 year ago
JSON representation
Creates an array of array values not included in the other given arrays.
- Host: GitHub
- URL: https://github.com/xotic750/array-difference-x
- Owner: Xotic750
- License: mit
- Created: 2017-08-24T20:14:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T22:46:30.000Z (about 3 years ago)
- Last Synced: 2024-04-25T02:42:45.011Z (almost 2 years ago)
- Topics: array, browser, difference, javascript, nodejs
- Language: JavaScript
- Size: 2.82 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## array-difference-x
Creates an array of array values not included in the other given arrays.
### `module.exports(array, [...exclude])` ⇒ array ⏏
This method creates an array of array values not included in the other given
arrays using SameValueZero for equality comparisons. The order and references
of result values are determined by the first array.
**Kind**: Exported function
**Returns**: array - Returns the new array of filtered values.
**Throws**:
- TypeError If array is null or undefined.
| Param | Type | Description |
| ------------ | ------------------ | ---------------------- |
| array | array | The array to inspect. |
| [...exclude] | array | The values to exclude. |
**Example**
```js
import difference from 'array-difference-x';
console.log(difference([2, 1], [2, 3])); // => [1]
```