MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / remove

Function remove

framework/framework/router.ts:8–11  ·  view source on GitHub ↗
(list: T[], item: T)

Source from the content-addressed store, hash-verified

6
7type WebSocketCallback = (socket: WebSocket, request: IncomingMessage, ctx: KoaContext) => void;
8function remove<T>(list: T[], item: T) {
9 const index = list.indexOf(item);
10 if (index >= 0) list.splice(index, 1);
11}
12
13export class WebSocketLayer {
14 clients = new Set<WebSocket>();

Callers 3

delMethod · 0.85
registerMethod · 0.85
wsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected