Skip to main content
Version: Next

geojsonType

Description

Enforce expectations about types of GeoJSON objects for Turf.

Parameters

NameTypeDescription
valueGeoJSONany GeoJSON object
typestringexpected GeoJSON type
namestringname of calling function

Returns

Installation

$ npm install @turf/invariant

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

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