tfk-unique-array
v2.0.0
Published
Creates an array of unique elements
Downloads
73
Readme
tfk-unique-array
Creates an array of unique values
Installation
$ npm install tfk-unique-array
Usage
const makeUnique = require('tfk-unique-array')
const objekt = {
title: 'Ole'
}
const streng = 'En dag jeg gikk tur'
const liste = [1,2,3,4,5,1,2,3,4,1,23,4,5, objekt, streng, streng, objekt, objekt, objekt]
console.log(makeUnique(liste))
//=>[ 1, 2, 3, 4, 5, 23, { title: 'Ole' }, 'En dag jeg gikk tur' ]