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

countBy-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import {countBy} from 'rambda'
const transformFn = (x: string) => x.toLowerCase()const list = ['a', 'A', 'b', 'B', 'c', 'C']
describe('R.countBy', () => { it('happy', () => { const result = countBy(transformFn, list)
result // $ExpectType Record<string, number> }) it('curried', () => { const result = countBy(transformFn)(list)
result // $ExpectType Record<string, number> })})
rambda

Version Info

Tagged at
2 months ago