objectWithoutProperties.js 986 B

123456789101112131415161718192021222324252627
  1. var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js/object/get-own-property-symbols");
  2. var _indexOfInstanceProperty = require("@babel/runtime-corejs3/core-js/instance/index-of");
  3. var objectWithoutPropertiesLoose = require("./objectWithoutPropertiesLoose.js");
  4. 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. }
  19. module.exports = _objectWithoutProperties;
  20. module.exports["default"] = module.exports, module.exports.__esModule = true;