/meriyah-printer

An ast printer based on astring for meriyah's ast format

Primary LanguageTypeScriptMIT LicenseMIT

Meriyah Printer

Tiny and fast JavaScript code generator that is compatible with all browser-supported nodes meriyah produces, fork of the astring library.

Usage

import * as meriyah from 'meriyah';
import { generate } from 'meriyah-printer';

const ast = meriyah.parseModule(code, {
  module: true,
  webcompat: true,
  directives: true,
  next: true,
  raw: true,
  jsx: true,
});

const code = generate(ast);