MCPcopy
hub / github.com/adrianhajdin/project_chat_application / removeUser

Function removeUser

server/users.js:19–23  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

17}
18
19const removeUser = (id) => {
20 const index = users.findIndex((user) => user.id === id);
21
22 if(index !== -1) return users.splice(index, 1)[0];
23}
24
25const getUser = (id) => users.find((user) => user.id === id);
26

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected