# @the-/ast

> AST (abstract syntax tree) parser

Latest version **16.2.7** (published 2021-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @the-/ast
pnpm add @the-/ast
yarn add @the-/ast
bun add @the-/ast
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 16.2.7 |
| Published | 2021-04-20 |
| First published | 2019-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 209.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | lib, the |

## Links

- npm: https://www.npmjs.com/package/@the-/ast
- Repository: https://github.com/the-labo/the
- Homepage: https://github.com/the-labo/the/tree/master/packages/ast#readme
- Issues: https://github.com/the-labo/the#issues
- npm.io page: https://npm.io/package/@the-/ast

## Dependencies (3)

- [@babel/types](https://npm.io/package/@babel/types.md) ^7.11.5
- [lodash.clone](https://npm.io/package/lodash.clone.md) ^4.5.0
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.11.5

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 16.2.7 (latest) — 2021-04-20
- 16.2.6 — 2020-08-01
- 16.2.5 — 2020-06-21
- 16.2.4 — 2020-06-05
- 16.2.3 — 2020-05-28
- 16.2.1 — 2020-05-27
- 16.2.0 — 2020-05-26
- 16.1.3 — 2020-05-21
- 16.1.2 — 2020-04-24
- 16.1.1 — 2020-04-01
- 16.1.0 — 2020-01-19
- 16.0.3 — 2020-01-13
- 16.0.2 — 2019-08-17
- 15.4.7 — 2019-05-25
- 15.4.5 — 2019-05-10
- … 12 more at https://npm.io/package/@the-/ast/versions

## README

@the-/ast
==========

<!---
This file is generated by @the-/templates. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![npm Version][bd_npm_shield_url]][bd_npm_url]

[bd_repo_url]: https://github.com/the-labo/the
[bd_npm_url]: http://www.npmjs.org/package/@the-/ast
[bd_npm_shield_url]: http://img.shields.io/npm/v/@the-/ast.svg?style=flat

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

AST (abstract syntax tree) parser

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>




<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/readme/01.Installation.md.hbs" Start -->

<a name="section-doc-readme-01-installation-md"></a>

Installation
-----

```bash
$ npm install @the-/ast --save
```


<!-- Section from "doc/readme/01.Installation.md.hbs" End -->

<!-- Section from "doc/readme/02.Usage.md.hbs" Start -->

<a name="section-doc-readme-02-usage-md"></a>

Usage
---------

```javascript
'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))

```


<!-- Section from "doc/readme/02.Usage.md.hbs" End -->


<!-- Sections Start -->

<a name="api"></a>

## API Guide


- global
  - [findByTypes(node,types)](./doc/api/api.md#findByTypes)
- module:@the-/ast
  - [.analyzer](./doc/api/api.md#module_@the-/ast.analyzer)
  - [.constants](./doc/api/api.md#module_@the-/ast.constants)
  - [.finder](./doc/api/api.md#module_@the-/ast.finder)
  - [.NodeTypes](./doc/api/api.md#module_@the-/ast.NodeTypes)
  - [.parse(content,options)](./doc/api/api.md#module_@the-/ast.parse)
- module
  - [.exports()](./doc/api/api.md#module.exports)

See [API Guide](./doc/api/api.md) for more detail


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][the_labo_url]

[the_labo_url]: https://github.com/the-labo

<!-- Links End -->

---
_Source: https://npm.io/package/@the-/ast · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
