MCPcopy
hub / github.com/yaklang/yakit / asyncEcho

Function asyncEcho

app/main/ipc.js:210–220  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

208
209 // asyncEcho wrapper
210 const asyncEcho = (params) => {
211 return new Promise((resolve, reject) => {
212 getClient().Echo(params, (err, data) => {
213 if (err) {
214 reject(err)
215 return
216 }
217 resolve(data)
218 })
219 })
220 }
221 ipcMain.handle('Echo', async (e, params) => {
222 return await asyncEcho(params)
223 })

Callers 1

ipc.jsFile · 0.85

Calls 1

getClientFunction · 0.85

Tested by

no test coverage detected