UNPKG

632 BJavaScriptView Raw
1import objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose";
2export default function _objectWithoutProperties(source, excluded) {
3 if (source == null) return {};
4 var target = objectWithoutPropertiesLoose(source, excluded);
5 var key, i;
6
7 if (Object.getOwnPropertySymbols) {
8 var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
9
10 for (i = 0; i < sourceSymbolKeys.length; i++) {
11 key = sourceSymbolKeys[i];
12 if (excluded.indexOf(key) >= 0) continue;
13 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
14 target[key] = source[key];
15 }
16 }
17
18 return target;
19}
\No newline at end of file