2 * is-descriptor <https://github.com/jonschlinkert/is-descriptor>
4 * Copyright (c) 2015-2017, Jon Schlinkert.
5 * Released under the MIT License.
10 var typeOf = require('kind-of');
11 var isAccessor = require('is-accessor-descriptor');
12 var isData = require('is-data-descriptor');
14 module.exports = function isDescriptor(obj, key) {
15 if (typeOf(obj) !== 'object') {
19 return isAccessor(obj, key);
21 return isData(obj, key);