matchUpFormat
The Tennis Open Data Standards MatchUp Format Codes provide a concise way of describing methods for scoring tennis matches that is both human and machine readable.
SET3-S:6/TB7
is the TODS representation for "Best 2 Out Of 3 Sets (Win By Two) 6 games with Tiebreak to 7
This package includes two methods to make it easier to work with TODS MatchUp Format Codes in projects related to tennis, by transforming valid format codes into JSON and valid JSON objects back into format codes.
note
The goal of the Tennis Open Data Standards (TODS) project is to create a single data exchange framework that allows the transfer of any tennis-related data between different information systems using consistent, agreed formats and methods.
#
Installation#
Use#
Methods#
parseConverts a TODS MatchUp Format Code into JSON
Parsing 'SET3-S:6/TB7-F:TB10' results in:
#
stringifyConverts compliant JSON into a TODS MatchUp Format Code, the reverse of the .parse() method.
#
isValidMatchUpFormatReturns boolean indicating whether matchUpFormat
is valid.