This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/is-descriptor/index.js
2019-08-11 20:48:02 +02:00

22 lines
498 B
JavaScript

/*!
* is-descriptor <https://github.com/jonschlinkert/is-descriptor>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var typeOf = require('kind-of');
var isAccessor = require('is-accessor-descriptor');
var isData = require('is-data-descriptor');
module.exports = function isDescriptor(obj, key) {
if (typeOf(obj) !== 'object') {
return false;
}
if ('get' in obj) {
return isAccessor(obj, key);
}
return isData(obj, key);
};