vis-why 1.2.2 → 1.2.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.
package/Readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![NPM version][npm-image]][npm-url]
2
- [![Build Status][travis-image]][travis-url]
3
- [![Dependency Status][gemnasium-image]][gemnasium-url]
2
+ [![Build Status][build-image]][build-url]
3
+ [![Dependency Status][deps-image]][deps-url]
4
4
 
5
5
  # vis-why
6
6
 
@@ -51,11 +51,11 @@ simplify(poly, 4, area);
51
51
  [npm]: https://www.npmjs.org/
52
52
  [vis-why]: https://hydra.hull.ac.uk/resources/hull:8338
53
53
 
54
- [npm-image]: https://img.shields.io/npm/v/vis-why.svg
54
+ [npm-image]: https://img.shields.io/npm/v/vis-why
55
55
  [npm-url]: https://npmjs.org/package/vis-why
56
56
 
57
- [travis-url]: https://travis-ci.org/pirxpilot/vis-why
58
- [travis-image]: https://img.shields.io/travis/pirxpilot/vis-why.svg
57
+ [build-url]: https://github.com/pirxpilot/vis-why/actions/workflows/check.yaml
58
+ [build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/vis-why/check.yaml?branch=main
59
59
 
60
- [gemnasium-image]: https://img.shields.io/gemnasium/pirxpilot/vis-why.svg
61
- [gemnasium-url]: https://gemnasium.com/pirxpilot/vis-why
60
+ [deps-image]: https://img.shields.io/librariesio/release/npm/vis-why
61
+ [deps-url]: https://libraries.io/npm/vis-why
package/index.js CHANGED
@@ -20,7 +20,8 @@ function calculate(poly, area) {
20
20
  ts = { heap: heap(areaCompare, true) },
21
21
  triangle,
22
22
  trianglePrev,
23
- a = poly[0], b, c = poly[1],
23
+ a = poly[0],
24
+ b, c = poly[1],
24
25
  list = [];
25
26
 
26
27
  // calculate areas
@@ -62,7 +63,7 @@ function eliminate(ts, limit, area) {
62
63
  nextTriangle,
63
64
  counter = ts.heap.size() - limit;
64
65
 
65
- while(counter-- > 0) {
66
+ while (counter-- > 0) {
66
67
  triangle = ts.heap.pop();
67
68
  prevTriangle = triangle.prev;
68
69
  nextTriangle = triangle.next;
@@ -91,7 +92,7 @@ function eliminate(ts, limit, area) {
91
92
  function collect(triangle) {
92
93
  var poly = [triangle.a];
93
94
 
94
- while(true) {
95
+ while (true) {
95
96
  poly.push(triangle.b);
96
97
  if (!triangle.next) {
97
98
  break;
package/package.json CHANGED
@@ -1,15 +1,12 @@
1
1
  {
2
2
  "name": "vis-why",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "M Visvalingam and J D Whyatt line simplification algorithm",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "make check"
8
8
  },
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/pirxpilot/vis-why.git"
12
- },
9
+ "repository": "pirxpilot/vis-why",
13
10
  "keywords": [
14
11
  "line",
15
12
  "simplification"
@@ -18,11 +15,10 @@
18
15
  "license": "MIT",
19
16
  "homepage": "https://github.com/pirxpilot/vis-why",
20
17
  "devDependencies": {
18
+ "@pirxpilot/jshint": "~3",
21
19
  "@pirxpilot/matcha": "~1",
22
- "jshint": "~2",
23
- "mocha": "~3",
24
20
  "polyline-encoded": "^0.0.8",
25
- "should": "~11"
21
+ "should": "~13"
26
22
  },
27
23
  "dependencies": {
28
24
  "sterta": "^2.2.1"
@@ -30,4 +26,4 @@
30
26
  "files": [
31
27
  "index.js"
32
28
  ]
33
- }
29
+ }
package/History.md DELETED
@@ -1,76 +0,0 @@
1
-
2
- 1.2.2 / 2017-04-15
3
- ==================
4
-
5
- * update deprecated dependencies
6
-
7
- 1.2.1 / 2017-02-17
8
- ==================
9
-
10
- * change name to vis-why
11
- * remove obsolete component.json
12
-
13
- 1.2.0 / 2017-02-08
14
- ==================
15
-
16
- * add support for custom area function
17
-
18
- 1.1.6 / 2017-01-12
19
- ==================
20
-
21
- * fix elimination of empty triangles
22
-
23
- 1.1.5 / 2016-12-15
24
- ==================
25
-
26
- * use @pirxpilot/matcha instead od matcha
27
- * minor adjustment to calculate loop
28
-
29
- 1.1.4 / 2016-12-10
30
- ==================
31
-
32
- * fix exception for duplicate and co-linear stops
33
-
34
- 1.1.3 / 2016-12-08
35
- ==================
36
-
37
- * make it faster - especially for polylines longer than 1k items
38
-
39
- 1.1.2 / 2016-12-06
40
- ==================
41
-
42
- * properly collect triangles
43
- * add basic benchmarks
44
- * let all test run
45
-
46
- 1.1.1 / 2016-11-18
47
- ==================
48
-
49
- * fix exception when applied to straight line case
50
-
51
- 1.1.0 / 2016-11-06
52
- ==================
53
-
54
- * fix Makefile test target
55
- * upgrade code42day-binary-heap to 2.0.0
56
- * upgrade mocha to ~3 and should to ~11
57
-
58
- 1.0.3 / 2015-11-11
59
- ==================
60
-
61
- * switch to browserify build
62
-
63
- 1.0.2 / 2014-07-30
64
- ==================
65
-
66
- * declare code42day/binary-heap dependency properly
67
-
68
- 1.0.1 / 2014-07-30
69
- ==================
70
-
71
- * optimization: rebuild triangle heap
72
-
73
- 1.0.0 / 2014-07-29
74
- ==================
75
-
76
- * Initial implementation