objectWithoutProperties.js 867 B

123456789101112131415161718192021
  1. import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js/object/get-own-property-symbols";
  2. import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
  3. import objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose.js";
  4. export default function _objectWithoutProperties(source, excluded) {
  5. if (source == null) return {};
  6. var target = objectWithoutPropertiesLoose(source, excluded);
  7. var key, i;
  8. if (_Object$getOwnPropertySymbols) {
  9. var sourceSymbolKeys = _Object$getOwnPropertySymbols(source);
  10. for (i = 0; i < sourceSymbolKeys.length; i++) {
  11. key = sourceSymbolKeys[i];
  12. if (_indexOfInstanceProperty(excluded).call(excluded, key) >= 0) continue;
  13. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  14. target[key] = source[key];
  15. }
  16. }
  17. return target;
  18. }