objectWithoutPropertiesLoose.js 546 B

123456789101112131415161718
  1. import _Object$keys from "@babel/runtime-corejs3/core-js/object/keys";
  2. import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
  3. export default 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. }