MCPcopy Create free account
hub / github.com/TanStack/db / map

Method map

packages/db-ivm/src/multiset.ts:36–40  ·  view source on GitHub ↗

* Apply a function to all records in the collection.

(f: (data: T) => U)

Source from the content-addressed store, hash-verified

34 * Apply a function to all records in the collection.
35 */
36 map<U>(f: (data: T) => U): MultiSet<U> {
37 return new MultiSet(
38 this.#inner.map(([data, multiplicity]) => [f(data), multiplicity]),
39 )
40 }
41
42 /**
43 * Filter out records for which a function f(record) evaluates to False.

Callers 15

getLoadedIdsFunction · 0.45
generateSeedDataFunction · 0.45
createSeedTxFunction · 0.45
encodeTransportValueFunction · 0.45
runScenarioFunction · 0.45
decodeTransportValueFunction · 0.45
encodePersistedJsonValueFunction · 0.45

Calls

no outgoing calls

Tested by 15

createSeedTxFunction · 0.36
createRecordingAdapterFunction · 0.36
seedPersistedFunction · 0.36
createTodosFunction · 0.36
getTestDataFunction · 0.36
seedPersistedFunction · 0.36
simulateInitialSyncFunction · 0.36
simulateResyncFunction · 0.36