From 9427720b04424da570b00f2e4979e47069665ffd Mon Sep 17 00:00:00 2001 From: Kevin Van Lierde Date: Sat, 6 Aug 2022 01:28:03 +0200 Subject: [PATCH] Add example to JSdoc --- src/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 4d082f5..e5c0ecd 100644 --- a/src/index.js +++ b/src/index.js @@ -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') {