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

includes-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {includes} from 'rambda'
const list = [{a: {b: '1'}}, {a: {c: '2'}}, {a: {b: '3'}}]
describe('R.includes', () => { it('happy', () => { const result = includes({a: {b: '1'}}, list) result // $ExpectType boolean const result2 = includes('oo', ['f', 'oo']) result2 // $ExpectType boolean }) it('with string', () => { const str = 'foo' as 'foo' | 'bar' const result = includes('oo', str) const curriedResult = includes('oo')(str)
result // $ExpectType boolean curriedResult // $ExpectType boolean })})
rambda

Version Info

Tagged at
2 months ago