UNPKG

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