Skip to main content
Version: Next

isObject

Description

isObject

Parameters

NameTypeDescription
inputanyvariable to validate

Returns

boolean true/false, including false for Arrays and Functions

Examples

turf.isObject({ elevation: 10 });
//=true
turf.isObject("foo");
//=false

Installation

$ npm install @turf/helpers

import { isObject } from "@turf/helpers";
const result = isObject(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.isObject(...);