@turf/transform-rotate 6.5.0 → 7.0.0-alpha.1

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
@@ -4,18 +4,18 @@
4
4
 
5
5
  ## transformRotate
6
6
 
7
- Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point;
8
- all rotations follow the right-hand rule: [https://en.wikipedia.org/wiki/Right-hand_rule][1]
7
+ Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point.
9
8
 
10
- **Parameters**
9
+ ### Parameters
11
10
 
12
- - `geojson` **[GeoJSON][2]** object to be rotated
13
- - `angle` **[number][3]** of rotation (along the vertical axis), from North in decimal degrees, negative clockwise
14
- - `options` **[Object][4]** Optional parameters (optional, default `{}`)
15
- - `options.pivot` **[Coord][5]** point around which the rotation will be performed (optional, default `'centroid'`)
16
- - `options.mutate` **[boolean][6]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
11
+ * `geojson` **[GeoJSON][1]** object to be rotated
12
+ * `angle` **[number][2]** of rotation in decimal degrees, positive clockwise
13
+ * `options` **[Object][3]** Optional parameters (optional, default `{}`)
17
14
 
18
- **Examples**
15
+ * `options.pivot` **[Coord][4]** point around which the rotation will be performed (optional, default `'centroid'`)
16
+ * `options.mutate` **[boolean][5]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
17
+
18
+ ### Examples
19
19
 
20
20
  ```javascript
21
21
  var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
@@ -27,19 +27,17 @@ var addToMap = [poly, rotatedPoly];
27
27
  rotatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};
28
28
  ```
29
29
 
30
- Returns **[GeoJSON][2]** the rotated GeoJSON feature
31
-
32
- [1]: https://en.wikipedia.org/wiki/Right-hand_rule
30
+ Returns **[GeoJSON][1]** the rotated GeoJSON feature
33
31
 
34
- [2]: https://tools.ietf.org/html/rfc7946#section-3
32
+ [1]: https://tools.ietf.org/html/rfc7946#section-3
35
33
 
36
- [3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
34
+ [2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
37
35
 
38
- [4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
36
+ [3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
39
37
 
40
- [5]: https://tools.ietf.org/html/rfc7946#section-3.1.1
38
+ [4]: https://tools.ietf.org/html/rfc7946#section-3.1.1
41
39
 
42
- [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
40
+ [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
43
41
 
44
42
  <!-- This file is automatically generated. Please don't edit it directly:
45
43
  if you find an error, edit the source file (likely index.js), and re-run
package/dist/es/index.js CHANGED
File without changes
package/dist/js/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/transform-rotate",
3
- "version": "6.5.0",
3
+ "version": "7.0.0-alpha.1",
4
4
  "description": "turf transform-rotate module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -31,6 +31,7 @@
31
31
  "exports": {
32
32
  "./package.json": "./package.json",
33
33
  ".": {
34
+ "types": "./index.d.ts",
34
35
  "import": "./dist/es/index.js",
35
36
  "require": "./dist/js/index.js"
36
37
  }
@@ -42,31 +43,32 @@
42
43
  "index.d.ts"
43
44
  ],
44
45
  "scripts": {
45
- "bench": "node -r esm bench.js",
46
+ "bench": "tsx bench.js",
46
47
  "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
47
- "docs": "node ../../scripts/generate-readmes",
48
+ "docs": "tsx ../../scripts/generate-readmes",
48
49
  "test": "npm-run-all test:*",
49
- "test:tape": "node -r esm test.js",
50
- "test:types": "tsc --esModuleInterop --noEmit types.ts"
50
+ "test:tape": "tsx test.js",
51
+ "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
51
52
  },
52
53
  "devDependencies": {
53
- "@turf/truncate": "^6.5.0",
54
+ "@turf/truncate": "^7.0.0-alpha.1",
54
55
  "benchmark": "*",
55
56
  "load-json-file": "*",
56
57
  "npm-run-all": "*",
57
58
  "rollup": "*",
58
59
  "tape": "*",
60
+ "tsx": "*",
59
61
  "write-json-file": "*"
60
62
  },
61
63
  "dependencies": {
62
- "@turf/centroid": "^6.5.0",
63
- "@turf/clone": "^6.5.0",
64
- "@turf/helpers": "^6.5.0",
65
- "@turf/invariant": "^6.5.0",
66
- "@turf/meta": "^6.5.0",
67
- "@turf/rhumb-bearing": "^6.5.0",
68
- "@turf/rhumb-destination": "^6.5.0",
69
- "@turf/rhumb-distance": "^6.5.0"
64
+ "@turf/centroid": "^7.0.0-alpha.1",
65
+ "@turf/clone": "^7.0.0-alpha.1",
66
+ "@turf/helpers": "^7.0.0-alpha.1",
67
+ "@turf/invariant": "^7.0.0-alpha.1",
68
+ "@turf/meta": "^7.0.0-alpha.1",
69
+ "@turf/rhumb-bearing": "^7.0.0-alpha.1",
70
+ "@turf/rhumb-destination": "^7.0.0-alpha.1",
71
+ "@turf/rhumb-distance": "^7.0.0-alpha.1"
70
72
  },
71
- "gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
73
+ "gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
72
74
  }