MCPcopy Create free account
hub / github.com/anus-dev/ANUS / stripJsonComments

Function stripJsonComments

packages/cli/src/ui/utils/terminalSetup.ts:41–44  ·  view source on GitHub ↗

* Removes single-line JSON comments (// ...) from a string to allow parsing * VS Code style JSON files that may contain comments.

(content: string)

Source from the content-addressed store, hash-verified

39 * VS Code style JSON files that may contain comments.
40 */
41function stripJsonComments(content: string): string {
42 // Remove single-line comments (// ...)
43 return content.replace(/^\s*\/\/.*$/gm, '');
44}
45
46export interface TerminalSetupResult {
47 success: boolean;

Callers 5

configureVSCodeStyleFunction · 0.85
loadEnvironmentFunction · 0.85
loadSettingsFunction · 0.85
loadTrustedFoldersFunction · 0.85
sandbox_command.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected