tasks/generate-info.js
function parseOutput(output) {
  if (!output) {
    throw new Error('Expected JSON output');
  }

  let info;
  try {
    info = JSON.parse(String(output));
  } catch (err) {
    throw new Error('Failed to parse output as JSON: ' + output);
  }
  if (!Array.isArray(info.symbols)) {
    throw new Error('Expected symbols array: ' + output);
  }
  if (!Array.isArray(info.defines)) {
    throw new Error('Expected defines array: ' + output);
  }

  return info;
}
function parseOutput(output) {
  if (!output) {
    throw new Error('Expected JSON output');
  }

  let info;
  try {
    info = JSON.parse(String(output));
  } catch (err) {
    throw new Error('Failed to parse output as JSON: ' + output);
  }
  if (!Array.isArray(info.symbols)) {
    throw new Error('Expected symbols array: ' + output);
  }
  if (!Array.isArray(info.defines)) {
    throw new Error('Expected defines array: ' + output);
  }

  return info;
}
function parseOutput ( output ) { if ( ! output ) { throw new Error ( 'Expected JSON output' ) ; } let info ; try { info = JSON . parse ( String ( output ) ) ; } catch ( err ) { throw new Error ( 'Failed to parse output as JSON: ' + output ) ; } if ( ! Array . isArray ( info . symbols ) ) { throw new Error ( 'Expected symbols array: ' + output ) ; } if ( ! Array . isArray ( info . defines ) ) { throw new Error ( 'Expected defines array: ' + output ) ; } return info ; }
Parse the JSDoc output.
@param {string} output JSDoc output
@return {Object} Symbol and define info.
Parse the JSDoc output .