Skip to main content
Module

x/rambda/uniq.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { includes } from './includes'
export function uniq(list){ let index = -1 const willReturn = []
while (++index < list.length){ const value = list[ index ]
if (!includes(value, willReturn)){ willReturn.push(value) } }
return willReturn}