MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / parsePlaylistGame

Function parsePlaylistGame

src/back/PlaylistFile.ts:125–137  ·  view source on GitHub ↗
(parser: IObjectParserProp<any>)

Source from the content-addressed store, hash-verified

123}
124
125function parsePlaylistGame(parser: IObjectParserProp<any>): PlaylistGame {
126 const game: PlaylistGame = {
127 notes: '',
128 gameId: ''
129 };
130 parser.prop('id', v => game.gameId = str(v), true);
131 parser.prop('gameId', v => game.gameId = str(v), true);
132 parser.prop('notes', v => game.notes = str(v));
133 if (!game.gameId) {
134 throw 'No ID for playlist game';
135 }
136 return game;
137}

Callers 1

overwritePlaylistDataFunction · 0.85

Calls 2

strFunction · 0.90
propMethod · 0.65

Tested by

no test coverage detected