Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS
vanillajs-helpers > “uniqueArray”
► uniqueArray(arr: any
[]): any
[]
Defined in uniqueArray.ts:12
Filter out any duplicate values from an array
uniqueArray([1,2,3,1,4,5,3,7]); // -> [1,2,3,4,5,6,7]
Parameters:
Param | Type | Description |
---|---|---|
arr | any [] |
Array to filter on |
Returns: any
[]