MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / once

Function once

scripts/proxy-utils.mjs:187–194  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

185}
186
187function once(fn) {
188 let called = false;
189 return (...args) => {
190 if (called) return;
191 called = true;
192 fn(...args);
193 };
194}
195
196function writeProxyError(res, message) {
197 if (res.destroyed) return;

Callers 7

proxyHttpFunction · 0.85
proxyWebSocketFunction · 0.85
dev-safe.test.tsFile · 0.85
stopChildFunction · 0.85
ingress.test.tsFile · 0.85

Calls

no outgoing calls

Tested by 1

stopChildFunction · 0.68