deno.land / x / rambda@v9.1.1 / source / count.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
import { isArray } from './_internals/isArray.js'
export function count(predicate, list){ if (arguments.length === 1){ return _list => count(predicate, _list) } if (!isArray(list)) return 0
return list.filter(x => predicate(x)).length}
rambda

Version Info

Tagged at
2 months ago