diff --git a/README.md b/README.md index 995158c..abcaed9 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,8 @@ hallmark --report json hallmark --report [ json --pretty ] ``` +In the programmatic API of `hallmark` (which is not documented yet) the reporter can also be disabled by passing `{ report: false }` as the options. + ## Install With [npm](https://npmjs.org) do: diff --git a/index.js b/index.js index 32d978b..2480019 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,9 @@ function hallmark (options, callback) { let reporter let reporterOptions - if (options.report) { + if (options.report === false) { + reporter = function noop () {} + } else if (options.report) { // Only take one --report option reporter = [].concat(options.report)[0]