MCPcopy Create free account
hub / github.com/Noumena-Network/code / toPropertyMap

Function toPropertyMap

src/utils/status.test.ts:92–103  ·  view source on GitHub ↗
(
  properties: Array<{ label?: string; value: unknown }>,
)

Source from the content-addressed store, hash-verified

90}
91
92function toPropertyMap(
93 properties: Array<{ label?: string; value: unknown }>,
94): Map<string, unknown> {
95 return new Map(
96 properties
97 .filter(
98 (property): property is { label: string; value: unknown } =>
99 typeof property.label === 'string',
100 )
101 .map(property => [property.label, property.value]),
102 )
103}
104
105beforeEach(async () => {
106 tempConfigDir = await mkdtemp(join(tmpdir(), 'ncode-status-'))

Callers 1

status.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected