UNPKG

@tidyjs/tidy

Version:

Tidy up your data with JavaScript, inspired by dplyr and the tidyverse

11 lines (9 loc) 293 B
function n(options) { if (options == null ? void 0 : options.predicate) { const predicate = options.predicate; return (items) => items.reduce((n2, d, i) => predicate(d, i, items) ? n2 + 1 : n2, 0); } return (items) => items.length; } export { n }; //# sourceMappingURL=n.js.map