deno.land / x / rambda@v9.1.1 / source / lensEq-spec.ts

lensEq-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import {lensEq, lensIndex, lensPath} from 'rambda'
describe('R.lensEq', () => { it('with list', () => { const list = ['foo', 'bar', 'baz'] const lens = lensIndex(0) const result = lensEq(lens, 1, list) result // $ExpectType boolean
const curriedResult = lensEq(lens, 1)(list) curriedResult // $ExpectType boolean }) it('with object', () => { const input = {a: {b: {c: 1}}} const target = {c: 1} const lens = lensPath('a.b') const result = lensEq(lens, target, input) result // $ExpectType boolean
const curriedResult = lensEq(lens, target)(input) curriedResult // $ExpectType boolean })})
rambda

Version Info

Tagged at
2 months ago