deno.land / x / rambda@v9.1.1 / source / complement.spec.js

complement.spec.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { complement } from './complement.js'
test('happy', () => { const fn = complement(x => x.length === 0)
expect(fn([ 1, 2, 3 ])).toBeTrue()})
test('with multiple parameters', () => { const between = function ( a, b, c ){ return a < b && b < c } const f = complement(between) expect(f( 4, 5, 11 )).toBeFalse() expect(f( 12, 2, 6 )).toBeTrue()})
rambda

Version Info

Tagged at
2 months ago