Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
export function serializeEveryFieldExceptCallerSuppliedPathsUnderTheFileKey(
value: unknown,
callerSuppliedPaths: readonly string[],
): string {
const supplied = new Set(callerSuppliedPaths);
return JSON.stringify(value, (key, val) =>
key === 'file' && typeof val === 'string' && supplied.has(val) ? undefined : val,
);
}