MCPcopy Create free account
hub / github.com/cortexkit/magic-context / asRecord

Function asRecord

packages/dashboard/src/lib/jsonc.test.ts:5–10  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

3import { parseJsonc, patchDreamerTasksJsonc, removeDreamerBlockJsonc } from "./jsonc";
4
5function asRecord(value: unknown): Record<string, unknown> {
6 expect(typeof value).toBe("object");
7 expect(value).not.toBeNull();
8 expect(Array.isArray(value)).toBe(false);
9 return value as Record<string, unknown>;
10}
11
12describe("dashboard JSONC patching", () => {
13 const configWithComments = `{// leading comment

Callers 1

jsonc.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected