npm.io
16.2.7 • Published 5 years ago

@the-/ast

Licence
MIT
Version
16.2.7
Deps
3
Size
209 kB
Vulns
0
Weekly
0
Stars
5

@the-/ast

npm Version

AST (abstract syntax tree) parser

Installation

$ npm install @the-/ast --save

Usage

'use strict'

const { parse } = require('@the-/ast')

async function tryExample() {
  const ast = parse('const a = 1 + 2')
  console.log(ast) // -> AST Tree object
}

tryExample().catch((err) => console.error(err))

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Keywords