Skip to main content
Module

x/rambda/reject.spec.js

Faster and smaller alternative to Ramda
Go to Latest
File
import { reject } from './reject'
const isOdd = n => n % 2 === 1
test('with array', () => { expect(reject(isOdd)([ 1, 2, 3, 4 ])).toEqual([ 2, 4 ])})
test('with object', () => { const obj = { a : 1, b : 2, c : 3, d : 4, } expect(reject(isOdd, obj)).toEqual({ b : 2, d : 4, })})