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.

15 lines
289 B

4 years ago
  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;