Socket
Socket
Sign inDemoInstall

is-descriptor

Package Overview
Dependencies
10
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.5 to 0.1.6

12

index.js
/*!
* is-descriptor <https://github.com/jonschlinkert/is-descriptor>
*
* Copyright (c) 2015, 2017, Jon Schlinkert.
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.

@@ -10,12 +10,14 @@ */

var utils = require('./utils');
var typeOf = require('kind-of');
var isAccessor = require('is-accessor-descriptor');
var isData = require('is-data-descriptor');
module.exports = function isDescriptor(obj, key) {
if (utils.typeOf(obj) !== 'object') {
if (typeOf(obj) !== 'object') {
return false;
}
if ('get' in obj) {
return utils.isAccessor(obj, key);
return isAccessor(obj, key);
}
return utils.isData(obj, key);
return isData(obj, key);
};
{
"name": "is-descriptor",
"description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.",
"version": "0.1.5",
"version": "0.1.6",
"homepage": "https://github.com/jonschlinkert/is-descriptor",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"<wtgtybhertgeghgtwtg@gmail.com> (https://github.com/wtgtybhertgeghgtwtg)",
"Brian Woodward <brian.woodward@gmail.com> (https://github.com/doowb)",
"Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
"Brian Woodward (https://twitter.com/doowb)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"(https://github.com/wtgtybhertgeghgtwtg)"
],

@@ -18,4 +18,3 @@ "repository": "jonschlinkert/is-descriptor",

"files": [
"index.js",
"utils.js"
"index.js"
],

@@ -32,8 +31,7 @@ "main": "index.js",

"is-data-descriptor": "^0.1.4",
"kind-of": "^3.0.2",
"lazy-cache": "^2.0.2"
"kind-of": "^5.0.0"
},
"devDependencies": {
"gulp-format-md": "^0.1.11",
"mocha": "*"
"gulp-format-md": "^1.0.0",
"mocha": "^3.4.2"
},

@@ -40,0 +38,0 @@ "keywords": [

@@ -1,2 +0,2 @@

# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor)
# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor)

@@ -157,3 +157,3 @@ > Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.

| --- | --- |
| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
| 24 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [doowb](https://github.com/doowb) |

@@ -194,2 +194,2 @@ | 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc