MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / parseJsonOutput

Function parseJsonOutput

packages/vscode-extension/extension.js:163–175  ·  view source on GitHub ↗
(stdout, commandName)

Source from the content-addressed store, hash-verified

161}
162
163function parseJsonOutput(stdout, commandName) {
164 const trimmed = stdout.trim();
165 if (!trimmed) {
166 throw new Error(`${commandName} did not print JSON output.`);
167 }
168
169 try {
170 return JSON.parse(trimmed);
171 } catch (error) {
172 const message = error instanceof Error ? error.message : String(error);
173 throw new Error(`Unable to parse ${commandName} JSON output: ${message}`);
174 }
175}
176
177function openSimulatorPanel(serverUrl) {
178 if (simulatorPanel) {

Callers 1

startProjectServiceFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected