@turf/bearing 4.5.2 → 4.7.3

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.
Files changed (3) hide show
  1. package/README.md +2 -16
  2. package/index.js +2 -17
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -14,22 +14,8 @@ i.e. the angle measured in degrees from the north line (0 degrees)
14
14
  **Examples**
15
15
 
16
16
  ```javascript
17
- var point1 = {
18
- "type": "Feature",
19
- "properties": {},
20
- "geometry": {
21
- "type": "Point",
22
- "coordinates": [-75.343, 39.984]
23
- }
24
- };
25
- var point2 = {
26
- "type": "Feature",
27
- "properties": {},
28
- "geometry": {
29
- "type": "Point",
30
- "coordinates": [-75.534, 39.123]
31
- }
32
- };
17
+ var point1 = turf.point([-75.343, 39.984]);
18
+ var point2 = turf.point([-75.534, 39.123]);
33
19
 
34
20
  var bearing = turf.bearing(point1, point2);
35
21
 
package/index.js CHANGED
@@ -12,22 +12,8 @@ var getCoord = require('@turf/invariant').getCoord;
12
12
  * @param {boolean} [final=false] calculates the final bearing if true
13
13
  * @returns {number} bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)
14
14
  * @example
15
- * var point1 = {
16
- * "type": "Feature",
17
- * "properties": {},
18
- * "geometry": {
19
- * "type": "Point",
20
- * "coordinates": [-75.343, 39.984]
21
- * }
22
- * };
23
- * var point2 = {
24
- * "type": "Feature",
25
- * "properties": {},
26
- * "geometry": {
27
- * "type": "Point",
28
- * "coordinates": [-75.534, 39.123]
29
- * }
30
- * };
15
+ * var point1 = turf.point([-75.343, 39.984]);
16
+ * var point2 = turf.point([-75.534, 39.123]);
31
17
  *
32
18
  * var bearing = turf.bearing(point1, point2);
33
19
  *
@@ -37,7 +23,6 @@ var getCoord = require('@turf/invariant').getCoord;
37
23
  * point2.properties['marker-color'] = '#0f0'
38
24
  * point1.properties.bearing = bearing
39
25
  */
40
-
41
26
  function bearing(start, end, final) {
42
27
  if (final === true) return calculateFinalBearing(start, end);
43
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/bearing",
3
- "version": "4.5.2",
3
+ "version": "4.7.3",
4
4
  "description": "turf bearing module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,13 +27,13 @@
27
27
  },
28
28
  "homepage": "https://github.com/Turfjs/turf",
29
29
  "devDependencies": {
30
- "@turf/destination": "^4.5.2",
31
- "@turf/helpers": "^4.5.2",
30
+ "@turf/destination": "^4.7.3",
31
+ "@turf/helpers": "^4.7.3",
32
32
  "benchmark": "^2.1.4",
33
33
  "tape": "^4.6.3",
34
34
  "write-json-file": "^2.0.0"
35
35
  },
36
36
  "dependencies": {
37
- "@turf/invariant": "^4.5.2"
37
+ "@turf/invariant": "^4.7.3"
38
38
  }
39
39
  }