MCPcopy
hub / github.com/mongodb/node-mongodb-native / stringsToMap

Function stringsToMap

src/sort.ts:94–97  ·  view source on GitHub ↗

@internal

(t: ReadonlyArray<string>)

Source from the content-addressed store, hash-verified

92
93/** @internal */
94function stringsToMap(t: ReadonlyArray<string>): SortForCmd {
95 const sortEntries: SortPairForCmd[] = t.map(key => [`${key}`, 1]);
96 return new Map(sortEntries);
97}
98
99/** @internal */
100function objectToMap(t: { readonly [key: string]: SortDirection }): SortForCmd {

Callers 1

formatSortFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected