scripts/generate-markdown-table.js
function generateMarkdownTable(api) {
  if (isEmpty(api.props)) return '';
  return HEADER.concat(
    join(map(api.props, (description, propName) =>
      join([
        `\`${propName}\``,
        description.required ? 'true' : '',
        inferType(description.type),
        replaceNewlineWithBreak(getValue(description, 'defaultValue.value', '')),
        replaceNewlineWithBreak(description.description),
      ], ' | ')
    ), '\n')
  );
}
function generateMarkdownTable(api) {
  if (isEmpty(api.props)) return '';
  return HEADER.concat(
    join(map(api.props, (description, propName) =>
      join([
        `\`${propName}\``,
        description.required ? 'true' : '',
        inferType(description.type),
        replaceNewlineWithBreak(getValue(description, 'defaultValue.value', '')),
        replaceNewlineWithBreak(description.description),
      ], ' | ')
    ), '\n')
  );
}
function generateMarkdownTable ( api ) { if ( isEmpty ( api . props ) ) return '' ; return HEADER . concat ( join ( map ( api . props , ( description , propName ) => join ( [ ` \` ${ propName } \` ` , description . required ? 'true' : '' , inferType ( description . type ) , replaceNewlineWithBreak ( getValue ( description , 'defaultValue.value' , '' ) ) , replaceNewlineWithBreak ( description . description ) , ] , ' | ' ) ) , '\n' ) ) ; }
given tree-like description of component api, return markdown table
header of table described by HEADER
@param {Object} api
@return {String}
given tree - like description of component api return markdown table header of table described by HEADER