MCPcopy
hub / github.com/PrismarineJS/mineflayer / once

Function once

lib/promise_utils.js:75–77  ·  view source on GitHub ↗
(emitter, event, timeout = 20000)

Source from the content-addressed store, hash-verified

73}
74
75function once (emitter, event, timeout = 20000) {
76 return onceWithCleanup(emitter, event, { timeout })
77}
78
79function withTimeout (promise, timeout) {
80 return Promise.race([

Callers 15

writeFunction · 0.85
enchantFunction · 0.85
craftOnceFunction · 0.85
openBlockFunction · 0.85
openEntityFunction · 0.85
waitForWindowUpdateFunction · 0.85
clickWindowFunction · 0.85
putAwayFunction · 0.85
flyToFunction · 0.85
openVillagerFunction · 0.85
tradeFunction · 0.85
combineFunction · 0.85

Calls 1

onceWithCleanupFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…