'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = filterObject;

var _foreach;

function _load_foreach() {
  return _foreach = _interopRequireDefault(require('./object/foreach'));
}

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 *
 */
function filterObject(obj, fn) {
  var newObj = {};
  (0, (_foreach || _load_foreach()).default)(obj, function (val, key) {
    if (fn(val, key)) newObj[key] = val;
  });
  return newObj;
}