Skip to content

Commit 9427720

Browse files
committed
Add example to JSdoc
1 parent 342b5e6 commit 9427720

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ function isDraft(value, fallback) {
2626
/**
2727
* Metalsmith plugin to hide drafts from the output.
2828
*
29-
* @param {Options} [options]
29+
* @param {Options|boolean} [options]
3030
* @returns {import('metalsmith').Plugin}
31+
* @example
32+
* metalsmith.use(drafts()) // same as { include: false }
33+
* metalsmith.use(drafts(true)) // same as { include: true }
34+
* metalsmith.use(drafts({ default: false, include: false })) // same as default
3135
*/
3236
function configureDrafts(options = defaultOptions) {
3337
if (typeof options === 'boolean') {

0 commit comments

Comments
 (0)