objectWithoutPropertiesLoose.js 666 B

1234567891011121314151617181920212223
  1. var _Object$keys = require("@babel/runtime-corejs3/core-js/object/keys");
  2. var _indexOfInstanceProperty = require("@babel/runtime-corejs3/core-js/instance/index-of");
  3. function _objectWithoutPropertiesLoose(source, excluded) {
  4. if (source == null) return {};
  5. var target = {};
  6. var sourceKeys = _Object$keys(source);
  7. var key, i;
  8. for (i = 0; i < sourceKeys.length; i++) {
  9. key = sourceKeys[i];
  10. if (_indexOfInstanceProperty(excluded).call(excluded, key) >= 0) continue;
  11. target[key] = source[key];
  12. }
  13. return target;
  14. }
  15. module.exports = _objectWithoutPropertiesLoose;
  16. module.exports["default"] = module.exports, module.exports.__esModule = true;