@time2win/t2w 2.0.1 → 2.0.2
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/CHANGELOG.md +4 -0
- package/index.js +8 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 2.0.2 - 2025-07-28
|
|
9
|
+
### Changed
|
|
10
|
+
empty array instead of undefined list
|
|
11
|
+
|
|
8
12
|
## 2.0.1 - 2025-07-28
|
|
9
13
|
### Changed
|
|
10
14
|
Optional check for all response map calls
|
package/index.js
CHANGED
|
@@ -170,9 +170,9 @@ var Time2WinAPI = /** @class */ (function () {
|
|
|
170
170
|
resolve(body);
|
|
171
171
|
_f.label = 3;
|
|
172
172
|
case 3:
|
|
173
|
-
body.list = (_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
173
|
+
body.list = ((_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
174
174
|
return __assign(__assign({}, p), { racenumNumeric: _this.getNumericBib(p.racenum), gender: p.team_type });
|
|
175
|
-
});
|
|
175
|
+
})) || [];
|
|
176
176
|
resolve(body);
|
|
177
177
|
return [2 /*return*/];
|
|
178
178
|
}
|
|
@@ -222,12 +222,12 @@ var Time2WinAPI = /** @class */ (function () {
|
|
|
222
222
|
resolve(body);
|
|
223
223
|
_f.label = 3;
|
|
224
224
|
case 3:
|
|
225
|
-
body.list = (_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
225
|
+
body.list = ((_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
226
226
|
var _a;
|
|
227
227
|
return __assign(__assign({}, p), { racenumNumeric: _this.getNumericBib(p.racenum), gender: p.team_type, members: ((_a = p.members) === null || _a === void 0 ? void 0 : _a.map(function (m) {
|
|
228
228
|
return __assign(__assign({}, m), { racenumNumeric: _this.getNumericBib(m.racenum) });
|
|
229
229
|
})) || [] });
|
|
230
|
-
});
|
|
230
|
+
})) || [];
|
|
231
231
|
resolve(body);
|
|
232
232
|
return [2 /*return*/];
|
|
233
233
|
}
|
|
@@ -352,9 +352,9 @@ var Time2WinAPI = /** @class */ (function () {
|
|
|
352
352
|
resolve(body);
|
|
353
353
|
_f.label = 3;
|
|
354
354
|
case 3:
|
|
355
|
-
body.list = (_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
355
|
+
body.list = ((_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
356
356
|
return __assign(__assign({}, p), { birthdate: p.birthdate ? new Date(p.birthdate) : null, racenumNumeric: _this.getNumericBib(p.racenum), speedNetto: _this.calculateSpeed(p, event, 'speed', 'netto') + ' km/h', speedBrutto: _this.calculateSpeed(p, event, 'speed', 'brutto') + ' km/h', paceNetto: _this.calculateSpeed(p, event, 'pace', 'netto') + ' min/km', paceBrutto: _this.calculateSpeed(p, event, 'pace', 'brutto') + ' min/km' });
|
|
357
|
-
});
|
|
357
|
+
})) || [];
|
|
358
358
|
resolve(body);
|
|
359
359
|
return [2 /*return*/];
|
|
360
360
|
}
|
|
@@ -407,10 +407,10 @@ var Time2WinAPI = /** @class */ (function () {
|
|
|
407
407
|
resolve(body);
|
|
408
408
|
_f.label = 3;
|
|
409
409
|
case 3:
|
|
410
|
-
body.list = (_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
410
|
+
body.list = ((_e = body.list) === null || _e === void 0 ? void 0 : _e.map(function (p) {
|
|
411
411
|
var race = event.races.find(function (r) { return r.race_id === p.race_id; });
|
|
412
412
|
return __assign(__assign({}, p), { birthdate: p.birthdate ? new Date(p.birthdate) : null, age: p.birthdate && race ? _this.calculateAge(new Date(p.birthdate), race.starttime) : null, year: p.birthdate ? new Date(p.birthdate).getFullYear() : null, order_date: p.order_date ? new Date(p.order_date) : null, racenumNumeric: _this.getNumericBib(p.racenum) });
|
|
413
|
-
});
|
|
413
|
+
})) || [];
|
|
414
414
|
resolve(body);
|
|
415
415
|
return [2 /*return*/];
|
|
416
416
|
}
|