1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/is-descriptor/index.js

17 lines
355 B
JavaScript

'use strict';
var isAccessor = require('is-accessor-descriptor');
var isData = require('is-data-descriptor');
module.exports = function isDescriptor(obj, key) {
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
return false;
}
if ('get' in obj || 'set' in obj) {
return isAccessor(obj, key);
}
return isData(obj, key);
};