source: trip-planner-front/node_modules/is-descriptor/index.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 498 bytes
Line 
1/*!
2 * is-descriptor <https://github.com/jonschlinkert/is-descriptor>
3 *
4 * Copyright (c) 2015-2017, Jon Schlinkert.
5 * Released under the MIT License.
6 */
7
8'use strict';
9
10var typeOf = require('kind-of');
11var isAccessor = require('is-accessor-descriptor');
12var isData = require('is-data-descriptor');
13
14module.exports = function isDescriptor(obj, key) {
15 if (typeOf(obj) !== 'object') {
16 return false;
17 }
18 if ('get' in obj) {
19 return isAccessor(obj, key);
20 }
21 return isData(obj, key);
22};
Note: See TracBrowser for help on using the repository browser.