UNPKG

@tidyjs/tidy

Version:

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

15 lines (11 loc) 373 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); 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; } exports.n = n; //# sourceMappingURL=n.js.map