1 | export default function _defineEnumerableProperties(obj, descs) {
|
2 | for (var key in descs) {
|
3 | var desc = descs[key];
|
4 | desc.configurable = desc.enumerable = true;
|
5 | if ("value" in desc) desc.writable = true;
|
6 | Object.defineProperty(obj, key, desc);
|
7 | }
|
8 |
|
9 | if (Object.getOwnPropertySymbols) {
|
10 | var objectSymbols = Object.getOwnPropertySymbols(descs);
|
11 |
|
12 | for (var i = 0; i < objectSymbols.length; i++) {
|
13 | var sym = objectSymbols[i];
|
14 | var desc = descs[sym];
|
15 | desc.configurable = desc.enumerable = true;
|
16 | if ("value" in desc) desc.writable = true;
|
17 | Object.defineProperty(obj, sym, desc);
|
18 | }
|
19 | }
|
20 |
|
21 | return obj;
|
22 | } |
\ | No newline at end of file |