objectWithoutProperties.js 725 B

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