test
This commit is contained in:
16
node_modules/is-descriptor/index.js
generated
vendored
Normal file
16
node_modules/is-descriptor/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'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);
|
||||
};
|
||||
Reference in New Issue
Block a user