UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

17 lines (12 loc) 276 B
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 }