Skip to main content
Module

x/lodash_es/mod.ts>has

lodash for deno use
Latest
function has
import { has } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

Checks if path is a direct property of object.

Examples

var object = { 'a': { 'b': 2 } }; var other = _.create({ 'a': _.create({ 'b': 2 }) });

_.has(object, 'a'); // => true

_.has(object, 'a.b'); // => true

_.has(object, ['a', 'b']); // => true

_.has(other, 'a'); // => false

Parameters

object

The object to query.

path

The path to check.