You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
632 B

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