objectWithoutPropertiesLoose.js 442 B

1234567891011121314151617181920
  1. var _Object$keys = require("../core-js/object/keys");
  2. function _objectWithoutPropertiesLoose(source, excluded) {
  3. if (source == null) return {};
  4. var target = {};
  5. var sourceKeys = _Object$keys(source);
  6. var key, i;
  7. for (i = 0; i < sourceKeys.length; i++) {
  8. key = sourceKeys[i];
  9. if (excluded.indexOf(key) >= 0) continue;
  10. target[key] = source[key];
  11. }
  12. return target;
  13. }
  14. module.exports = _objectWithoutPropertiesLoose;