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