MCPcopy Create free account
hub / github.com/CommE2E/comm / arrayToStringVector

Function arrayToStringVector

web/shared-worker/utils/vector-utils.js:31–44  ·  view source on GitHub ↗
(
  array: $ReadOnlyArray<string>,
  dbModule: EmscriptenModule,
)

Source from the content-addressed store, hash-verified

29}
30
31function arrayToStringVector(
32 array: $ReadOnlyArray<string>,
33 dbModule: EmscriptenModule,
34): EmscriptenVector<string> {
35 if (!dbModule || !dbModule.StringVector) {
36 throw new Error('Database module or StringVector not available');
37 }
38
39 const vector = new dbModule.StringVector();
40 for (const item of array) {
41 vector.push_back(item);
42 }
43 return vector;
44}
45
46function arrayToIntegrityThreadHashVector(
47 array: $ReadOnlyArray<ClientDBIntegrityThreadHash>,

Callers 15

removeDraftsMethod · 0.90
removeMessagesMethod · 0.90
removeMediaForThreadsMethod · 0.90
removeReportsMethod · 0.90
removeUsersMethod · 0.90
removeThreadsMethod · 0.90
removeKeyserversMethod · 0.90
removeCommunitiesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected