Skip to content

Instantly share code, notes, and snippets.

View midknightmare666's full-sized avatar
🏠
Working from home

midknighmare midknightmare666

🏠
Working from home
View GitHub Profile
/**
* Remove all duplicate items from array
*
* @param {Array} array input array
* @returns {Array} an array of unique values
*
*/
function unique (array) {
return [...array.reduce((acc, curr) => {