"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.filter = void 0;
var filter = exports.filter = function filter(predicates, cmd) {
  return function (state, dispatch, view) {
    if (!Array.isArray(predicates)) {
      predicates = [predicates];
    }
    if (predicates.some(function (pred) {
      return !pred(state, view);
    })) {
      return false;
    }
    return cmd(state, dispatch, view) || false;
  };
};