Skip to content

Commit

Permalink
Differentiate false and undefined default values (#94)
Browse files Browse the repository at this point in the history
* Check for undefined default value

* semicolon
  • Loading branch information
cmbrose authored Oct 31, 2022
1 parent 13e6807 commit c99d6d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/generateDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ async function _generateDocumentation(basePath: string, readmeTemplate: string,
const contents = keys
.map(k => {
const val = options[k];
return `| ${k} | ${val.description || '-'} | ${val.type || '-'} | ${val.default || '-'} |`;

const desc = val.description || '-';
const type = val.type || '-';
const def = val.default !== undefined ? val.default : '-';

return `| ${k} | ${desc} | ${type} | ${def} |`;
})
.join('\n');

Expand Down

0 comments on commit c99d6d7

Please sign in to comment.