Const
Paints an AST node as plain text without color formatting Convenience wrapper around paint() that uses the log_policy
The AST node to paint
Optional configuration. Defaults will be used for any missing values.
The painted string representation of the node without any color formatting
const ast = parse_string('{"name": "John"}');const painted = paint_log(ast); // Uses log policy with defaultsconsole.log(painted); // Plain text output: {name: "John"} Copy
const ast = parse_string('{"name": "John"}');const painted = paint_log(ast); // Uses log policy with defaultsconsole.log(painted); // Plain text output: {name: "John"}
const ast = parse_string('{"name": "John"}');const options = { containers: customContainers };const painted = paint_log(ast, options);fs.writeFileSync('output.txt', painted); // Save plain text to file Copy
const ast = parse_string('{"name": "John"}');const options = { containers: customContainers };const painted = paint_log(ast, options);fs.writeFileSync('output.txt', painted); // Save plain text to file
Paints an AST node as plain text without color formatting Convenience wrapper around paint() that uses the log_policy