You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
855 B
30 lines
855 B
4 years ago
|
var _Object$getOwnPropertySymbols = require("../core-js/object/get-own-property-symbols");
|
||
|
|
||
|
var _Object$defineProperty = require("../core-js/object/define-property");
|
||
|
|
||
|
function _defineEnumerableProperties(obj, descs) {
|
||
|
for (var key in descs) {
|
||
|
var desc = descs[key];
|
||
|
desc.configurable = desc.enumerable = true;
|
||
|
if ("value" in desc) desc.writable = true;
|
||
|
|
||
|
_Object$defineProperty(obj, key, desc);
|
||
|
}
|
||
|
|
||
|
if (_Object$getOwnPropertySymbols) {
|
||
|
var objectSymbols = _Object$getOwnPropertySymbols(descs);
|
||
|
|
||
|
for (var i = 0; i < objectSymbols.length; i++) {
|
||
|
var sym = objectSymbols[i];
|
||
|
var desc = descs[sym];
|
||
|
desc.configurable = desc.enumerable = true;
|
||
|
if ("value" in desc) desc.writable = true;
|
||
|
|
||
|
_Object$defineProperty(obj, sym, desc);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return obj;
|
||
|
}
|
||
|
|
||
|
module.exports = _defineEnumerableProperties;
|