tods-competition-factory 2.2.43 → 2.2.46
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/dist/index.mjs +2 -2
- package/dist/tods-competition-factory.d.ts +2 -0
- package/dist/tods-competition-factory.development.cjs.js +6 -2
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -9964,6 +9964,8 @@ type ParsedSetString = {
|
|
|
9964
9964
|
side1Score?: number;
|
|
9965
9965
|
side2Score?: number;
|
|
9966
9966
|
setNumber: number;
|
|
9967
|
+
NoAD?: boolean;
|
|
9968
|
+
tiebreakSet?: boolean;
|
|
9967
9969
|
};
|
|
9968
9970
|
declare function parseScoreString({ tiebreakTo, scoreString, matchUpFormat }: ParseScoreArgs): ParsedSetString[];
|
|
9969
9971
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.2.
|
|
6
|
+
return '2.2.46';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SINGLES_MATCHUP = 'SINGLES';
|
|
@@ -32700,7 +32700,7 @@ function parseScoreString({ tiebreakTo = 7, scoreString = '', matchUpFormat }) {
|
|
|
32700
32700
|
return tiebreakTo;
|
|
32701
32701
|
const isDecidingSet = setNumber === bestOfSets;
|
|
32702
32702
|
const setFormat = isDecidingSet && parsedFormat.finalSetFormat ? parsedFormat.finalSetFormat : parsedFormat.setFormat;
|
|
32703
|
-
return setFormat?.tiebreakFormat?.tiebreakTo ?? tiebreakTo;
|
|
32703
|
+
return setFormat?.tiebreakSet?.tiebreakTo ?? setFormat?.tiebreakFormat?.tiebreakTo ?? tiebreakTo;
|
|
32704
32704
|
}
|
|
32705
32705
|
function parseTiebreakGame(tiebreakMatch, winningSide, setNumber) {
|
|
32706
32706
|
const setTiebreakLowScore = tiebreakMatch[1];
|
|
@@ -32746,6 +32746,8 @@ function parseScoreString({ tiebreakTo = 7, scoreString = '', matchUpFormat }) {
|
|
|
32746
32746
|
const bracketed = inBrackets.exec(set);
|
|
32747
32747
|
const isTiebreakOnlySet = set?.startsWith('[') && bracketed;
|
|
32748
32748
|
const isTiebreakOnlyFormat = checkIsTiebreakOnlyFormat(setNumber, !!isTiebreakOnlySet);
|
|
32749
|
+
const setSpecificTiebreakTo = getTiebreakToForSet(setNumber);
|
|
32750
|
+
const isNoAD = isTiebreakOnlyFormat && setSpecificTiebreakTo === 1;
|
|
32749
32751
|
let result;
|
|
32750
32752
|
if (isTiebreakOnlySet) {
|
|
32751
32753
|
const bracketedScores = bracketed[1].split('-').map((score) => Number.parseInt(score));
|
|
@@ -32761,6 +32763,8 @@ function parseScoreString({ tiebreakTo = 7, scoreString = '', matchUpFormat }) {
|
|
|
32761
32763
|
side2TiebreakScore: result.side2TiebreakScore,
|
|
32762
32764
|
winningSide: result.winningSide,
|
|
32763
32765
|
setNumber,
|
|
32766
|
+
...(isNoAD && { NoAD: true }),
|
|
32767
|
+
...(isTiebreakOnlyFormat && { tiebreakSet: true }),
|
|
32764
32768
|
};
|
|
32765
32769
|
}
|
|
32766
32770
|
}
|