MCPcopy
hub / github.com/electerm/electerm / func

Function func

src/client/entry/worker.js:26–32  ·  view source on GitHub ↗
(evt)

Source from the content-addressed store, hash-verified

24 ws.id = id
25 ws.once = (callack, id) => {
26 const func = (evt) => {
27 const arg = JSON.parse(evt.data)
28 if (id === arg.id) {
29 callack(arg)
30 ws.removeEventListener('message', func)
31 }
32 }
33 ws.addEventListener('message', func)
34 }
35 ws.onclose = () => {

Callers 4

ItemListTreeClass · 0.50
FileSectionClass · 0.50
SftpClass · 0.50
onceMethod · 0.50

Calls 2

parseMethod · 0.80
removeEventListenerMethod · 0.80

Tested by

no test coverage detected