babel/packages/babel-generator
Steven Luscher b6dabff82e Correct type annotation for shouldPrintComment
I think this is supposed to be a `Function` that returns a `boolean`.
2015-12-17 10:50:59 -08:00
..
2015-12-16 12:24:45 -08:00
2015-10-29 19:28:05 -07:00

babel-generator

Turns an AST into code.

Install

$ npm install babel-generator

Usage

import {parse} from 'babylon';
import generate from 'babel-generator';

const code = 'class Example {}';
const ast = parse(ast);

const output = generate(ast, { /* options */ }, code);