Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

deep-has

1.0.0 • Public • Published

Deep has Build Status

Find all instances of a specified key within a given object.

usage

With code such as:

var has = require('deep-has');

var obj = {
    foo: {
        bar: '123'
    },
    bar: false
};

var x = has(obj, 'bar');

x would be:

[
    { 'bar': false },
    { 'foo.bar': '123' }
]

The tests also provide further insight.

install

npm i deep-has

Downloadsweekly downloads

219

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability