Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

has-own-deep

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-own-deep - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

23

package.json
{
"name": "has-own-deep",
"description": "Returns true if an object has an own, nested property.",
"version": "0.1.0",
"description": "Returns true if an object has an own, nested property using dot notation paths ('a.b.c').",
"version": "0.1.1",
"homepage": "https://github.com/jonschlinkert/has-own-deep",

@@ -31,3 +31,2 @@ "author": {

},
"dependencies": {},
"devDependencies": {

@@ -37,3 +36,19 @@ "mocha": "*",

},
"keywords": []
"keywords": [
"check",
"deep",
"dot",
"has",
"has-own",
"key",
"keys",
"nested",
"notation",
"object",
"own",
"paths",
"prop",
"property",
"value"
]
}

@@ -1,4 +0,4 @@

# has-own-deep [![NPM version](https://badge.fury.io/js/has-own-deep.svg)](http://badge.fury.io/js/has-own-deep)
# has-own-deep [![NPM version](https://badge.fury.io/js/has-own-deep.svg)](http://badge.fury.io/js/has-own-deep) [![Build Status](https://travis-ci.org/jonschlinkert/has-own-deep.svg)](https://travis-ci.org/jonschlinkert/has-own-deep)
> Returns true if an object has an own, nested property.
> Returns true if an object has an own, nested property using dot notation paths ('a.b.c').

@@ -15,6 +15,32 @@ ## Install with [npm](npmjs.org)

var hasOwnDeep = require('has-own-deep');
hasOwnDeep({});
//=> false
hasOwnDeep({a: 'b'}, 'a');
//=> true
var obj = {a: {b: {c: 'd'}}};
hasOwnDeep(obj, 'a');
//=> true
hasOwnDeep(obj, 'a.b');
//=> true
hasOwnDeep(obj, 'a.b.c');
//=> true
hasOwnDeep(obj, 'c');
//=> false
hasOwnDeep(obj, 'a.c');
//=> false
hasOwnDeep(obj, 'a.b.d');
//=> false
```
## Related projects
{%= related([]) %}
* [set-value](https://github.com/jonschlinkert/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.
* [get-value](https://github.com/jonschlinkert/get-value): Use property paths (`a.b.c`) get a nested value from an object.
* [has-value](https://github.com/jonschlinkert/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
* [has-any](https://github.com/jonschlinkert/has-any): Returns true if an object has any of the specified keys.
* [has-any-deep](https://github.com/jonschlinkert/has-any-deep): Return true if `key` exists deeply on the given object.
* [any](https://github.com/jonschlinkert/any): Returns `true` if a value exists in the given string, array or object.

@@ -21,0 +47,0 @@ ## Running tests

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc