Comparing version 3.7.0 to 3.7.3
/// <reference types="geojson" /> | ||
type Point = GeoJSON.FeatureCollection<GeoJSON.Point>; | ||
type Points = GeoJSON.FeatureCollection<GeoJSON.Point>; | ||
type Polygons = GeoJSON.FeatureCollection<GeoJSON.Polygon>; | ||
@@ -9,4 +9,4 @@ | ||
*/ | ||
declare function tin(points: Points, z: string): Polygons; | ||
declare function tin(points: Points, z?: string): Polygons; | ||
declare namespace tin { } | ||
export = tin; |
@@ -18,3 +18,3 @@ //http://en.wikipedia.org/wiki/Delaunay_triangulation | ||
* @param {FeatureCollection<Point>} points input points | ||
* @param {String=} z name of the property from which to pull z values | ||
* @param {String} [z] name of the property from which to pull z values | ||
* This is optional: if not given, then there will be no extra data added to the derived triangles. | ||
@@ -21,0 +21,0 @@ * @return {FeatureCollection<Polygon>} TIN output |
{ | ||
"name": "@turf/tin", | ||
"version": "3.7.0", | ||
"version": "3.7.3", | ||
"description": "turf tin module", | ||
@@ -29,5 +29,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@turf/helpers": "^3.6.3" | ||
"@turf/helpers": "^3.7.3" | ||
}, | ||
"types": "index.d.ts" | ||
} |
var test = require('tape'); | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var tin = require('./index.js'); | ||
test('tin', function(t){ | ||
var points = JSON.parse(fs.readFileSync(__dirname+'/test/Points.geojson')); | ||
var points = require(path.join(__dirname, 'test', 'Points.json')); | ||
var tinned = tin(points, 'elevation'); | ||
@@ -12,4 +13,4 @@ | ||
fs.writeFileSync(__dirname+'/test/Tin.geojson', JSON.stringify(tinned)); | ||
fs.writeFileSync(path.join(__dirname, 'test', 'Tin.json'), JSON.stringify(tinned)); | ||
t.end(); | ||
}); |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
12794
256
3
Updated@turf/helpers@^3.7.3