@turf/truncate
Advanced tools
Comparing version 6.5.0 to 7.0.0-alpha.0
@@ -25,4 +25,3 @@ import { coordEach } from "@turf/meta"; | ||
*/ | ||
function truncate(geojson, options) { | ||
if (options === void 0) { options = {}; } | ||
function truncate(geojson, options = {}) { | ||
// Optional parameters | ||
@@ -29,0 +28,0 @@ var precision = options.precision; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var meta_1 = require("@turf/meta"); | ||
const meta_1 = require("@turf/meta"); | ||
/** | ||
@@ -27,4 +27,3 @@ * Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry. | ||
*/ | ||
function truncate(geojson, options) { | ||
if (options === void 0) { options = {}; } | ||
function truncate(geojson, options = {}) { | ||
// Optional parameters | ||
@@ -31,0 +30,0 @@ var precision = options.precision; |
{ | ||
"name": "@turf/truncate", | ||
"version": "6.5.0", | ||
"version": "7.0.0-alpha.0", | ||
"description": "turf truncate module", | ||
@@ -50,3 +50,3 @@ "author": "Turf Authors", | ||
"test:tape": "ts-node -r esm test.js", | ||
"test:types": "tsc --esModuleInterop --noEmit types.ts" | ||
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" | ||
}, | ||
@@ -65,6 +65,7 @@ "devDependencies": { | ||
"dependencies": { | ||
"@turf/helpers": "^6.5.0", | ||
"@turf/meta": "^6.5.0" | ||
"@turf/helpers": "^7.0.0-alpha.0", | ||
"@turf/meta": "^7.0.0-alpha.0", | ||
"tslib": "^2.3.0" | ||
}, | ||
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e" | ||
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189" | ||
} |
@@ -9,12 +9,13 @@ # @turf/truncate | ||
**Parameters** | ||
### Parameters | ||
- `geojson` **[GeoJSON][1]** any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection. | ||
- `options` **[Object][2]** Optional parameters (optional, default `{}`) | ||
- `options.precision` **[number][3]** coordinate decimal precision (optional, default `6`) | ||
- `options.coordinates` **[number][3]** maximum number of coordinates (primarly used to remove z coordinates) (optional, default `3`) | ||
- `options.mutate` **[boolean][4]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`) | ||
* `geojson` **[GeoJSON][1]** any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection. | ||
* `options` **[Object][2]** Optional parameters (optional, default `{}`) | ||
**Examples** | ||
* `options.precision` **[number][3]** coordinate decimal precision (optional, default `6`) | ||
* `options.coordinates` **[number][3]** maximum number of coordinates (primarly used to remove z coordinates) (optional, default `3`) | ||
* `options.mutate` **[boolean][4]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`) | ||
### Examples | ||
```javascript | ||
@@ -21,0 +22,0 @@ var point = turf.point([ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
68
11879
3
182
1
+ Addedtslib@^2.3.0
+ Added@turf/helpers@7.1.0(transitive)
+ Added@turf/meta@7.1.0(transitive)
+ Added@types/geojson@7946.0.14(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@turf/helpers@6.5.0(transitive)
- Removed@turf/meta@6.5.0(transitive)
Updated@turf/helpers@^7.0.0-alpha.0
Updated@turf/meta@^7.0.0-alpha.0