Skip to main content
Version: 7.3.0

geojsonType

描述

🌐 Description

强制执行 Turf 对 GeoJSON 对象类型的预期。

🌐 Enforce expectations about types of GeoJSON objects for Turf.

参数

🌐 Parameters

名称类型描述
valueGeoJSON任何 GeoJSON 对象
typestring预期的 GeoJSON 类型
namestring调用函数的名称

返回

🌐 Returns

void

安装

🌐 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(...);