Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

_baseAssignValue.js 625B

12345678910111213141516171819202122232425
  1. var defineProperty = require('./_defineProperty');
  2. /**
  3. * The base implementation of `assignValue` and `assignMergeValue` without
  4. * value checks.
  5. *
  6. * @private
  7. * @param {Object} object The object to modify.
  8. * @param {string} key The key of the property to assign.
  9. * @param {*} value The value to assign.
  10. */
  11. function baseAssignValue(object, key, value) {
  12. if (key == '__proto__' && defineProperty) {
  13. defineProperty(object, key, {
  14. 'configurable': true,
  15. 'enumerable': true,
  16. 'value': value,
  17. 'writable': true
  18. });
  19. } else {
  20. object[key] = value;
  21. }
  22. }
  23. module.exports = baseAssignValue;