UNPKG

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