MCPcopy Index your code
hub / github.com/bytecodealliance/ComponentizeJS / parseWizerStderr

Function parseWizerStderr

src/componentize.js:472–482  ·  view source on GitHub ↗

* Parse output of post-processing step (whether Wizer or Weval) * * @param {Stream} stderr * @returns {string} String that can be printed to describe error output

(stderr)

Source from the content-addressed store, hash-verified

470 * @returns {string} String that can be printed to describe error output
471 */
472function parseWizerStderr(stderr) {
473 let output = `${stderr}`;
474 let causeStart = output.indexOf(WIZER_ERROR_CAUSE_PREFIX);
475 let exitCodeStart = output.indexOf(WIZER_EXIT_CODE_PREFIX);
476 if (causeStart === -1 || exitCodeStart === -1) {
477 return output;
478 }
479
480 let causeEnd = output.indexOf('\n', exitCodeStart + 1);
481 return `${output.substring(0, causeStart)}${output.substring(causeEnd)}`.trim();
482}
483
484/**
485 * Check whether a value is numeric (including BigInt)

Callers 1

componentizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected