count.js 350 B

123456789
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.count = void 0;
  4. var reduce_1 = require("./reduce");
  5. function count(predicate) {
  6. return reduce_1.reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0);
  7. }
  8. exports.count = count;
  9. //# sourceMappingURL=count.js.map