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

Method parseBasic

src/adapters/youdao.ts:64–78  ·  view source on GitHub ↗
(basic: any)

Source from the content-addressed store, hash-verified

62 }
63
64 private parseBasic(basic: any) {
65 if (basic) {
66 let pronounce;
67 basic.explains.forEach((explain) => {
68 pronounce = this.isChinese ? explain : this.word;
69 this.addResult(explain, this.word, explain, pronounce);
70 });
71
72 if (basic.phonetic) {
73 // 获取音标,同时确定要发音的单词
74 const phonetic: string = this.parsePhonetic(basic);
75 this.addResult( phonetic, "回车可听发音", "~" + pronounce, pronounce );
76 }
77 }
78 }
79
80 private parseWeb(web: any) {
81 if (web) {

Callers 1

parseMethod · 0.95

Calls 2

addResultMethod · 0.95
parsePhoneticMethod · 0.95

Tested by

no test coverage detected