描述
强制检查 Turf 的 GeoJSON 对象类型。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| value | GeoJSON | 任何 GeoJSON 对象 |
| type | string | 期望的 GeoJSON 类型 |
| name | string | 调用函数名称 |
返回值
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(...);