Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/truncate

Package Overview
Dependencies
Maintainers
7
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/truncate - npm Package Compare versions

Comparing version 6.5.0 to 7.0.0-alpha.0

3

dist/es/index.js

@@ -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([

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc