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