json.js 194 B

123456789
  1. export default class JSONReporter {
  2. constructor ({ stream } = {}) {
  3. this.stream = stream || process.stdout
  4. }
  5. log (logObj) {
  6. this.stream.write(JSON.stringify(logObj) + '\n')
  7. }
  8. }