MCPcopy
hub / github.com/wensonsmith/YoudaoTranslator / parse

Method parse

src/adapters/youdao.ts:43–55  ·  view source on GitHub ↗
(data: any)

Source from the content-addressed store, hash-verified

41 }
42
43 parse(data: any): Result[] {
44 if (data.errorCode !== "0") {
45 return this.parseError(data.errorCode);
46 }
47
48 const { translation, basic, web } = data;
49
50 this.parseTranslation(translation);
51 this.parseBasic(basic);
52 this.parseWeb(web);
53
54 return this.results;
55 }
56
57 private parseTranslation(translation: object) {
58 if (translation) {

Callers

nothing calls this directly

Calls 4

parseErrorMethod · 0.95
parseTranslationMethod · 0.95
parseBasicMethod · 0.95
parseWebMethod · 0.95

Tested by

no test coverage detected