Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Latest commit

 

History

History
54 lines (44 loc) · 1.81 KB

has.md

File metadata and controls

54 lines (44 loc) · 1.81 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


has(object, path) ⇒ *

Determines if a nested value is defined

Param Type Description
object Object
path String Dot delimited string

Example

import { has } from 'object-agent';

const thing = {
    a: [{
        b: 'c'
    }, {
        b: 'd'
    }]
};

has(thing, 'a.1.b');
// => true