mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
23 lines
650 B
JavaScript
23 lines
650 B
JavaScript
|
var _Object$defineProperty = require("../core-js/object/define-property");
|
||
|
|
||
|
var _Object$getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor");
|
||
|
|
||
|
var _Object$getOwnPropertyNames = require("../core-js/object/get-own-property-names");
|
||
|
|
||
|
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;
|