Skip to main content
Module

x/rambda/uniq.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { uniq } from './uniq'
test('uniq', () => { expect(uniq([ 1, 2, 3, 3, 3, 1, 2, 0 ])).toEqual([ 1, 2, 3, 0 ]) expect(uniq([ 1, 1, 2, 1 ])).toEqual([ 1, 2 ]) expect([ 1, '1' ]).toEqual([ 1, '1' ]) expect(uniq([ [ 42 ], [ 42 ] ])).toEqual([ [ 42 ] ])})