UNPKG

1.14 kBJavaScriptView Raw
1'use strict';
2
3function _objectWithoutPropertiesLoose(source, excluded) {
4 if (source == null) return {};
5 var target = {};
6 var sourceKeys = Object.keys(source);
7 var key, i;
8
9 for (i = 0; i < sourceKeys.length; i++) {
10 key = sourceKeys[i];
11 if (excluded.indexOf(key) >= 0) continue;
12 target[key] = source[key];
13 }
14
15 return target;
16}
17
18var objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
19
20function _objectWithoutProperties(source, excluded) {
21 if (source == null) return {};
22 var target = objectWithoutPropertiesLoose(source, excluded);
23 var key, i;
24
25 if (Object.getOwnPropertySymbols) {
26 var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
27
28 for (i = 0; i < sourceSymbolKeys.length; i++) {
29 key = sourceSymbolKeys[i];
30 if (excluded.indexOf(key) >= 0) continue;
31 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
32 target[key] = source[key];
33 }
34 }
35
36 return target;
37}
38
39var objectWithoutProperties = _objectWithoutProperties;
40
41exports._objectWithoutProperties = objectWithoutProperties;
42//# sourceMappingURL=objectWithoutProperties-35db8ab0.js.map