Skip to content

描述 ​

强制检查 Turf 的 GeoJSON 对象类型。

参数 ​

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

返回值 ​

void

安装 ​

javascript
$ npm install @turf/invariant

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

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