turf-invariant

enforce expectations about inputs to turf

Turf packages are now namespaced: please use @turf/invariant instead
Last updated 8 years ago by tmcw .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install turf-invariant 
SYNC missed versions from official npm registry.

turf-invariant

build status

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

Current Tags

  • 3.0.7-canary.ae89c8b3                                ...           canary (8 years ago)
  • 3.0.12                                ...           latest (8 years ago)

9 Versions

  • 3.0.12 [deprecated]           ...           8 years ago
  • 3.0.10 [deprecated]           ...           8 years ago
  • 3.0.7-canary.ae89c8b3                                ...           8 years ago
  • 3.0.1 [deprecated]           ...           8 years ago
  • 3.0.0-canary.7879bf6c                                ...           8 years ago
  • 3.0.0-canary.2f5f7167                                ...           8 years ago
  • 1.0.3 [deprecated]           ...           10 years ago
  • 1.0.2 [deprecated]           ...           10 years ago
  • 1.0.1 [deprecated]           ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE