1 | 'use strict';
|
2 | var DESCRIPTORS = require('../internals/descriptors');
|
3 | var V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');
|
4 | var definePropertyModule = require('../internals/object-define-property');
|
5 | var anObject = require('../internals/an-object');
|
6 | var toIndexedObject = require('../internals/to-indexed-object');
|
7 | var objectKeys = require('../internals/object-keys');
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
13 | anObject(O);
|
14 | var props = toIndexedObject(Properties);
|
15 | var keys = objectKeys(Properties);
|
16 | var length = keys.length;
|
17 | var index = 0;
|
18 | var key;
|
19 | while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
20 | return O;
|
21 | };
|