Projekt

Obecné

Profil

Stáhnout (995 Bajtů) Statistiky
| Větev: | Revize:
1 3a515b92 cagy
"use strict";
2
3
exports.__esModule = true;
4
5
var _defineProperty = require("../core-js/object/define-property");
6
7
var _defineProperty2 = _interopRequireDefault(_defineProperty);
8
9
var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor");
10
11
var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
12
13
var _getOwnPropertyNames = require("../core-js/object/get-own-property-names");
14
15
var _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames);
16
17
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
19
exports.default = function (obj, defaults) {
20
  var keys = (0, _getOwnPropertyNames2.default)(defaults);
21
22
  for (var i = 0; i < keys.length; i++) {
23
    var key = keys[i];
24
    var value = (0, _getOwnPropertyDescriptor2.default)(defaults, key);
25
26
    if (value && value.configurable && obj[key] === undefined) {
27
      (0, _defineProperty2.default)(obj, key, value);
28
    }
29
  }
30
31
  return obj;
32
};