IsPropertyDescriptor.js 518 B

1234567891011121314151617
  1. 'use strict';
  2. var isPropertyDescriptor = require('../helpers/isPropertyDescriptor');
  3. var Type = require('./Type');
  4. var IsDataDescriptor = require('./IsDataDescriptor');
  5. var IsAccessorDescriptor = require('./IsAccessorDescriptor');
  6. // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
  7. module.exports = function IsPropertyDescriptor(Desc) {
  8. return isPropertyDescriptor({
  9. IsDataDescriptor: IsDataDescriptor,
  10. IsAccessorDescriptor: IsAccessorDescriptor,
  11. Type: Type
  12. }, Desc);
  13. };