defineProperty.js 540 B

123456789101112131415161718192021222324
  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, key, value) {
  7. if (key in obj) {
  8. (0, _defineProperty2.default)(obj, key, {
  9. value: value,
  10. enumerable: true,
  11. configurable: true,
  12. writable: true
  13. });
  14. } else {
  15. obj[key] = value;
  16. }
  17. return obj;
  18. };