@tidyjs/tidy
Version:
Tidy up your data with JavaScript, inspired by dplyr and the tidyverse
20 lines (15 loc) • 514 B
JavaScript
Object.defineProperty(exports, '__esModule', { value: true });
var summarize = require('./summarize.js');
var n = require('./summary/n.js');
var sum = require('./summary/sum.js');
function tally(options) {
const _tally = (items) => {
const {name = "n", wt} = options != null ? options : {};
const summarized = summarize.summarize({[name]: wt == null ? n.n() : sum.sum(wt)})(items);
return summarized;
};
return _tally;
}
exports.tally = tally;
//# sourceMappingURL=tally.js.map
;