MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / sortedRecord

Function sortedRecord

packages/plugins/mcp/src/sdk/plugin.ts:750–757  ·  view source on GitHub ↗
(
  record: Record<string, string | null | undefined> | undefined,
)

Source from the content-addressed store, hash-verified

748// same-identity reuse (a mismatch merely costs a fresh dial), but insertion
749// order must not make two equal identities look distinct.
750const sortedRecord = (
751 record: Record<string, string | null | undefined> | undefined,
752): Record<string, string | null> =>
753 Object.fromEntries(
754 Object.entries(record ?? {})
755 .filter((entry): entry is [string, string | null] => entry[1] !== undefined)
756 .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)),
757 );
758
759/** The pooled remote connection's identity, as an opaque digest.
760 *

Callers 1

connectionPoolKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected