IsPropertyDescriptor.js 554 B

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