prettier-x-printer
v0.0.2
Published
pretty printer from prettierX
Downloads
2
Readme
prettier-x-printer
Provides the Acorn / Babel / ESTree AST printing capability from prettierX.
LICENSE: MIT license
Sample
const { parse } = require("@babel/parser");
const { printAcornTree } = require("prettier-x-printer");
const code = "console.log ('hello world')";
const ast = parse(code);
console.log(
printAcornTree(code, ast, {
semi: false,
spaceInParens: true,
})
);
expected output:
console.log( "hello world" )