isFullyPopulatedPropertyDescriptor.js 355 B

1234567891011
  1. 'use strict';
  2. var isPropertyDescriptor = require('./records/property-descriptor');
  3. module.exports = function isFullyPopulatedPropertyDescriptor(ES, Desc) {
  4. return isPropertyDescriptor(Desc)
  5. && typeof Desc === 'object'
  6. && '[[Enumerable]]' in Desc
  7. && '[[Configurable]]' in Desc
  8. && (ES.IsAccessorDescriptor(Desc) || ES.IsDataDescriptor(Desc));
  9. };