defineProperty.js 367 B

12345678910111213141516
  1. function _defineProperty(obj, key, value) {
  2. if (key in obj) {
  3. Object.defineProperty(obj, key, {
  4. value: value,
  5. enumerable: true,
  6. configurable: true,
  7. writable: true
  8. });
  9. } else {
  10. obj[key] = value;
  11. }
  12. return obj;
  13. }
  14. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;