@rasifix/orienteering-utils 2.0.45 → 2.0.47

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.
@@ -64,7 +64,7 @@ var OwareFormat = /** @class */ (function () {
64
64
  lines
65
65
  .filter(function (line) { return line.trim().length > 0; })
66
66
  .forEach(function (line) {
67
- var cols = line.split(";");
67
+ var cols = line.split(/[;,]/);
68
68
  if (cols.length < 50) {
69
69
  category = parseCategory(cols);
70
70
  competition.categories.push(category);
@@ -86,7 +86,7 @@ function parseRanking(runners) {
86
86
  var idealTime = Object.keys(legs)
87
87
  .map(function (code) { return legs[code].idealSplit; })
88
88
  .filter(function (time) { return time !== undefined; })
89
- .reduce(sum);
89
+ .reduce(sum, 0);
90
90
  // each leg's weight is calculated regarding as a ratio of the ideal split time to the ideal time
91
91
  Object.keys(legs).forEach(function (code) {
92
92
  var leg = legs[code];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasifix/orienteering-utils",
3
- "version": "2.0.45",
3
+ "version": "2.0.47",
4
4
  "description": "utility functions for orienteering result analyzis",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",