defineEnumerableProperties.js 537 B

1234567891011121314151617181920
  1. "use strict";
  2. exports.__esModule = true;
  3. var _defineProperty = require("../core-js/object/define-property");
  4. var _defineProperty2 = _interopRequireDefault(_defineProperty);
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6. exports.default = function (obj, descs) {
  7. for (var key in descs) {
  8. var desc = descs[key];
  9. desc.configurable = desc.enumerable = true;
  10. if ("value" in desc) desc.writable = true;
  11. (0, _defineProperty2.default)(obj, key, desc);
  12. }
  13. return obj;
  14. };