UNPKG

v8r

Version:

A command-line JSON, YAML and TOML validator that's on your wavelength

18 lines (13 loc) 345 B
import { BasePlugin } from "../plugins.js"; class JsonOutput extends BasePlugin { static name = "v8r-plugin-json-output"; registerOutputFormats() { return ["json"]; } getAllResultsLogMessage(results, format) { if (format === "json") { return JSON.stringify({ results }, null, 2); } } } export default JsonOutput;