1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = proxyObject;
|
7 |
|
8 |
|
9 |
|
10 | function proxyObject(obj, extendProps) {
|
11 | if (typeof Proxy !== 'undefined' && obj) {
|
12 | return new Proxy(obj, {
|
13 | get: function get(target, prop) {
|
14 | if (extendProps[prop]) {
|
15 | return extendProps[prop];
|
16 | }
|
17 |
|
18 |
|
19 | var originProp = target[prop];
|
20 | return typeof originProp === 'function' ? originProp.bind(target) : originProp;
|
21 | }
|
22 | });
|
23 | }
|
24 | return obj;
|
25 | } |
\ | No newline at end of file |