Skip to content

Commit

Permalink
Add example to JSdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed Aug 5, 2022
1 parent 342b5e6 commit 9427720
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ function isDraft(value, fallback) {
/**
* Metalsmith plugin to hide drafts from the output.
*
* @param {Options} [options]
* @param {Options|boolean} [options]
* @returns {import('metalsmith').Plugin}
* @example
* metalsmith.use(drafts()) // same as { include: false }
* metalsmith.use(drafts(true)) // same as { include: true }
* metalsmith.use(drafts({ default: false, include: false })) // same as default
*/
function configureDrafts(options = defaultOptions) {
if (typeof options === 'boolean') {
Expand Down

0 comments on commit 9427720

Please sign in to comment.