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

Function parseExecMappingsFile

src/back/Execs.ts:31–41  ·  view source on GitHub ↗
(data: any, onError?: (error: string) => void)

Source from the content-addressed store, hash-verified

29}
30
31function parseExecMappingsFile(data: any, onError?: (error: string) => void) : ExecMappingFile {
32 const parsed: ExecMappingFile = {
33 execs: [],
34 };
35 const parser = new ObjectParser({
36 input: data,
37 onError: onError && ((e) => { onError(`Error while parsing Exec Mappings: ${e.toString()}`); })
38 });
39 parser.prop('execs').array(item => parsed.execs.push(parseExecMapping(item)));
40 return parsed;
41}
42
43function parseExecMapping(parser: IObjectParserProp<any>) : ExecMapping {
44 const parsed: ExecMapping = {

Callers 1

loadExecMappingsFileFunction · 0.85

Calls 6

parseExecMappingFunction · 0.85
onErrorFunction · 0.70
toStringMethod · 0.65
arrayMethod · 0.65
propMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected