@turf/truncate 6.4.0 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,15 +6,16 @@
6
6
 
7
7
  Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.
8
8
 
9
- **Parameters**
9
+ ### Parameters
10
10
 
11
- - `geojson` **[GeoJSON][1]** any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.
12
- - `options` **[Object][2]** Optional parameters (optional, default `{}`)
13
- - `options.precision` **[number][3]** coordinate decimal precision (optional, default `6`)
14
- - `options.coordinates` **[number][3]** maximum number of coordinates (primarly used to remove z coordinates) (optional, default `3`)
15
- - `options.mutate` **[boolean][4]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
11
+ * `geojson` **[GeoJSON][1]** any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.
12
+ * `options` **[Object][2]** Optional parameters (optional, default `{}`)
16
13
 
17
- **Examples**
14
+ * `options.precision` **[number][3]** coordinate decimal precision (optional, default `6`)
15
+ * `options.coordinates` **[number][3]** maximum number of coordinates (primarly used to remove z coordinates) (optional, default `3`)
16
+ * `options.mutate` **[boolean][4]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
17
+
18
+ ### Examples
18
19
 
19
20
  ```javascript
20
21
  var point = turf.point([
package/dist/es/index.js CHANGED
@@ -22,8 +22,7 @@ import { coordEach } from "@turf/meta";
22
22
  * //addToMap
23
23
  * var addToMap = [truncated];
24
24
  */
25
- function truncate(geojson, options) {
26
- if (options === void 0) { options = {}; }
25
+ function truncate(geojson, options = {}) {
27
26
  // Optional parameters
28
27
  var precision = options.precision;
29
28
  var coordinates = options.coordinates;
File without changes
package/dist/js/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var meta_1 = require("@turf/meta");
3
+ const meta_1 = require("@turf/meta");
4
4
  /**
5
5
  * Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.
6
6
  *
@@ -24,8 +24,7 @@ var meta_1 = require("@turf/meta");
24
24
  * //addToMap
25
25
  * var addToMap = [truncated];
26
26
  */
27
- function truncate(geojson, options) {
28
- if (options === void 0) { options = {}; }
27
+ function truncate(geojson, options = {}) {
29
28
  // Optional parameters
30
29
  var precision = options.precision;
31
30
  var coordinates = options.coordinates;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/truncate",
3
- "version": "6.4.0",
3
+ "version": "7.0.0-alpha.0",
4
4
  "description": "turf truncate module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -15,6 +15,7 @@
15
15
  "type": "git",
16
16
  "url": "git://github.com/Turfjs/turf.git"
17
17
  },
18
+ "funding": "https://opencollective.com/turf",
18
19
  "publishConfig": {
19
20
  "access": "public"
20
21
  },
@@ -46,7 +47,7 @@
46
47
  "docs": "node ../../scripts/generate-readmes",
47
48
  "test": "npm-run-all test:*",
48
49
  "test:tape": "ts-node -r esm test.js",
49
- "test:types": "tsc --esModuleInterop --noEmit types.ts"
50
+ "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@types/tape": "*",
@@ -60,8 +61,9 @@
60
61
  "write-json-file": "*"
61
62
  },
62
63
  "dependencies": {
63
- "@turf/helpers": "^6.4.0",
64
- "@turf/meta": "^6.4.0"
64
+ "@turf/helpers": "^7.0.0-alpha.0",
65
+ "@turf/meta": "^7.0.0-alpha.0",
66
+ "tslib": "^2.3.0"
65
67
  },
66
- "gitHead": "1e62773cfc88c627cca8effcb5c14cfb65a905ac"
68
+ "gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
67
69
  }