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

pretty-format-ast

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-format-ast

pretty-format2 plugin to print ASTs prettier

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
261
decreased by-86.75%
Maintainers
1
Weekly downloads
 
Created
Source

pretty-format-ast

pretty-format2 plugin to print ASTs prettier

Installation

yarn add pretty-format pretty-format-ast

Usage

const prettyFormat2 = require('pretty-format2');
const prettyFormatAST = require('pretty-format-ast');

prettyFormat2(val, {
  plugins: [prettyFormatAST],
})
Node "FunctionDeclaration"
  __clone: [Function __clone]
  async: false
  body: Node "BlockStatement" (1:29, 1:31)
    body: Array []
    directives: Array []
  expression: false
  generator: false
  id: Node "Identifier" (1:9, 1:10)
    name: "a"
  params: Array [
    Node "Identifier" (1:11, 1:18)
      name: "b"
      typeAnnotation: Node "TypeAnnotation" (1:12, 1:18)
        typeAnnotation: Node "StringLiteralTypeAnnotation" (1:14, 1:18)
          extra: Object {
            "raw": "\"hi\"",
            "rawValue": "hi",
          }
          value: "hi",
    Node "Identifier" (1:20, 1:21)
      name: "c",
    Node "RestElement" (1:23, 1:27)
      argument: Node "Identifier" (1:26, 1:27)
        name: "d",
  ]

FAQs

Package last updated on 08 Sep 2017

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