_object_without_properties.js 953 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _objectWithoutProperties;
  6. var _objectWithoutPropertiesLooseMjs = _interopRequireDefault(require("./_object_without_properties_loose.js"));
  7. function _objectWithoutProperties(source, excluded) {
  8. if (source == null) return {};
  9. var target = (0, _objectWithoutPropertiesLooseMjs).default(source, excluded);
  10. var key, i;
  11. if (Object.getOwnPropertySymbols) {
  12. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  13. for(i = 0; i < sourceSymbolKeys.length; i++){
  14. key = sourceSymbolKeys[i];
  15. if (excluded.indexOf(key) >= 0) continue;
  16. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  17. target[key] = source[key];
  18. }
  19. }
  20. return target;
  21. }
  22. function _interopRequireDefault(obj) {
  23. return obj && obj.__esModule ? obj : {
  24. default: obj
  25. };
  26. }