Skip to main content
Module

x/ramda/source/index.js>countBy

:ram: Practical functional Javascript
Latest
variable countBy
import { countBy } from "https://deno.land/x/ramda@v0.27.2/source/index.js";

Counts the elements of a list according to how many match each value of a key generated by the supplied function. Returns an object mapping the keys produced by fn to the number of occurrences in the list. Note that all keys are coerced to strings because of how JavaScript objects work.

Acts as a transducer if a transformer is given in list position.