Creates a duplicate-free version of an array, using SameValueZero for equality comparisons.
npm install array-uniq-x href="https://travis-ci.org/Xotic750/array-uniq-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/array-uniq-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/array-uniq-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/array-uniq-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/array-uniq-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/array-uniq-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/array-uniq-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/array-uniq-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
Creates a duplicate-free version of an array, using SameValueZero for equality comparisons,
in which only the first occurrence of each element is kept. The order of result values is
determined by the order they occur in the array.
This method is just a placeholder.
Kind: Exported member
Returns: Array - Returns the new duplicate free array.
| Param | Type | Description |
| -------------- | -------------------- | ----------------------- |
| array | Array | The array to inspect. |
| [useSameValue] | Boolean | Alternative comparison. |
Example
``js
import uniq from 'array-uniq-x';
console.log(uniq([2, 1, 2])); // [2, 1]
console.log(uniq([-0, 0])); // [0]
console.log(uniq([-0, 0], true)); // [-0, 0]
``