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

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
import { add } from './add.js'import { when } from './when.js'
const predicate = x => typeof x === 'number'
test('happy', () => { const fn = when(predicate, add(11)) expect(fn(11)).toBe(22) expect(fn('foo')).toBe('foo')})
rambda

Version Info

Tagged at
2 months ago