MCPcopy Create free account
hub / github.com/BootBoi/android-app / getIndexOfConnection

Function getIndexOfConnection

src/Connection/ConnectionStoreHelper.ts:11–22  ·  view source on GitHub ↗
(
  storedConnections: Connection[],
  connection: Connection,
)

Source from the content-addressed store, hash-verified

9}
10
11function getIndexOfConnection(
12 storedConnections: Connection[],
13 connection: Connection,
14): number {
15 const connectionInStore = storedConnections.find(
16 (c) => c.id === connection.id,
17 );
18 if (!connectionInStore) {
19 return -1;
20 }
21 return storedConnections.indexOf(connectionInStore);
22}
23
24export async function getStoredConnection(
25 id: number,

Callers 2

insertOrUpdateConnectionFunction · 0.85
deleteConnectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected