MCPcopy Create free account
hub / github.com/codemistic/Web-Development / removeUser

Function removeUser

Chat_app/src/utils/users.js:33–39  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

31}
32
33const removeUser = (id) => {
34 const index = users.findIndex((user) => user.id === id)
35
36 if (index !== -1) {
37 return users.splice(index, 1)[0]
38 }
39}
40
41const getUser = (id) => {
42 return users.find((user) => user.id == id)

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected