3.0.12 • Published 8 years ago
turf-invariant v3.0.12
turf-invariant
enforce expectations about inputs to turf
geojsonType(value, type, name)
Enforce expectations about types of GeoJSON objects for Turf.
Parameters
parameter | type | description |
---|---|---|
value | GeoJSON | any GeoJSON object |
type | string | expected GeoJSON type |
name | String | name of calling function |
featureOf(feature, types, name)
Enforce expectations about types of Feature inputs for Turf. Internally this uses geojsonType to judge geometry types.
Parameters
parameter | type | description |
---|---|---|
feature | Feature | a feature with an expected geometry type |
types | string | expected GeoJSON type |
name | String | name of calling function |
collectionOf(featurecollection, type, name)
Enforce expectations about types of FeatureCollection inputs for Turf. Internally this uses geojsonType to judge geometry types.
Parameters
parameter | type | description |
---|---|---|
featurecollection | FeatureCollection | a featurecollection for which features will be judged |
type | string | expected GeoJSON type |
name | String | name of calling function |
Installation
Requires nodejs.
$ npm install turf-invariant
Tests
$ npm test
3.0.12
8 years ago
3.0.10
9 years ago
3.0.7-canary.ae89c8b3
9 years ago
3.0.1
9 years ago
3.0.0-canary.7879bf6c
9 years ago
3.0.0-canary.2f5f7167
9 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago