summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npm-audit-report/reporters/json.js
blob: 6bf5097efd7ec995dbb7abd370e20c4d1608a3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'

const report = function (data, options) {
  const defaults = {
    indent: 2
  }

  const config = Object.assign({}, defaults, options)

  const json = JSON.stringify(data, null, config.indent)
  return {
    report: json,
    exitCode: 0
  }
}

module.exports = report