featureOf
Description
Enforce expectations about types of Feature inputs for Turf. Internally this uses geojsonType to judge geometry types.
Parameters
Name | Type | Description |
---|---|---|
feature | Feature | a feature with an expected geometry type |
type | string | expected GeoJSON type |
name | string | name of calling function |
Returns
Installation
$ npm install @turf/invariant
import { featureOf } from "@turf/invariant";
const result = featureOf(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.featureOf(...);