Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@putout/printer

Package Overview
Dependencies
Maintainers
1
Versions
593
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/printer

Easiest possible opinionated Babel AST printer made with ❤️ to use in 🐊Putout

  • 1.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.9K
decreased by-4.8%
Maintainers
1
Weekly downloads
 
Created
Source

Printer NPM version

EasyPrint prints Babel AST to readable JavaScript.

  • ☝️ Similar to Recast, but simpler and easier in maintenance, since it supports only Babel.
  • ☝️ As opinionated as Prettier, but has more user-friendly output and works directly with AST.
  • ☝️ Like ESLint but without any configuration and plugins 🤷‍, also works directly with Babel AST only.

Install

npm i @putout/printer

API

const {print} = require('@putout/printer');
const {parse} = require('@babel/parser');

const ast = parse('const a = (b, c) => {const d = 5; return a;}');
print(ast);
// returns
`
const a = (b, c) => {
    const d = 5;
    return a;
};
`;

License

MIT

Keywords

FAQs

Package last updated on 16 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc