@turf/invariant
Advanced tools
Comparing version 4.0.0 to 4.0.1
/// <reference types="geojson" /> | ||
type Feature = GeoJSON.Feature<any> | ||
type Features = GeoJSON.FeatureCollection<any> | ||
type GetCoord = Feature | any[] | GeoJSON.GeometryObject | ||
type Feature = GeoJSON.Feature<any>; | ||
type Features = GeoJSON.FeatureCollection<any>; | ||
type GetCoord = Feature | any[] | GeoJSON.GeometryObject; | ||
@@ -25,3 +25,3 @@ /** | ||
*/ | ||
export function featureOf(feature: Feature, type: string, name: string): void | ||
export function featureOf(feature: Feature, type: string, name: string): void; | ||
@@ -31,2 +31,7 @@ /** | ||
*/ | ||
export function collectionOf(featurecollection: Features, type: string, name: string): void | ||
export function collectionOf(featurecollection: Features, type: string, name: string): void; | ||
/** | ||
* http://turfjs.org/docs/ | ||
*/ | ||
export function containsNumber(coordinates: any[]): boolean; |
@@ -65,3 +65,4 @@ /** | ||
} | ||
if (coordinates[0].length) { | ||
if (Array.isArray(coordinates[0]) && coordinates[0].length) { | ||
return containsNumber(coordinates[0]); | ||
@@ -142,1 +143,2 @@ } | ||
module.exports.getCoords = getCoords; | ||
module.exports.containsNumber = containsNumber; |
{ | ||
"name": "@turf/invariant", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "turf invariant module", | ||
@@ -31,3 +31,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@turf/helpers": "^4.0.0", | ||
"@turf/helpers": "^4.0.1", | ||
"benchmark": "^2.1.3", | ||
@@ -34,0 +34,0 @@ "tape": "^3.5.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11519
157