Newer
Older
alert / js / node_modules / @babel / runtime / helpers / defaults.js
@Réz István Réz István on 18 Nov 2021 462 bytes first commit
function _defaults(obj, defaults) {
  var keys = Object.getOwnPropertyNames(defaults);

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    var value = Object.getOwnPropertyDescriptor(defaults, key);

    if (value && value.configurable && obj[key] === undefined) {
      Object.defineProperty(obj, key, value);
    }
  }

  return obj;
}

module.exports = _defaults;
module.exports["default"] = module.exports, module.exports.__esModule = true;