turf-common 1.2.1-beta.54 → 1.2.1-beta.56
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.
|
@@ -186,9 +186,10 @@ var TurfAvailability = /** @class */ (function () {
|
|
|
186
186
|
this.toTimeCode = timeCodeRange.slice(4, 8);
|
|
187
187
|
this.weekDays = Array.from(new Set(this.dateCodes.map(function (dateCode) {
|
|
188
188
|
return booking_code_model_1.BookingCode.getWeekday(Number(dateCode));
|
|
189
|
-
})));
|
|
189
|
+
}))).sort();
|
|
190
190
|
};
|
|
191
191
|
TurfAvailability.parse = function (eventCode) {
|
|
192
|
+
var _a;
|
|
192
193
|
var eventCodes = eventCode.split("#");
|
|
193
194
|
var dateCodeRange = eventCodes[1];
|
|
194
195
|
var timeCodeRange = eventCodes[2];
|
|
@@ -198,7 +199,7 @@ var TurfAvailability = /** @class */ (function () {
|
|
|
198
199
|
endDateCode: dateCodeRange.slice(6, 12),
|
|
199
200
|
fromTimeCode: timeCodeRange.slice(0, 4),
|
|
200
201
|
toTimeCode: timeCodeRange.slice(4, 8),
|
|
201
|
-
weekDays: eventCodes[4].split(",").map(Number),
|
|
202
|
+
weekDays: ((_a = eventCodes[4]) === null || _a === void 0 ? void 0 : _a.split(",").map(Number)) || -1,
|
|
202
203
|
};
|
|
203
204
|
};
|
|
204
205
|
return TurfAvailability;
|