# acorn-jsx-walk

> JSX support for Acorn Walk

Latest version **2.0.0** (published 2019-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install acorn-jsx-walk
pnpm add acorn-jsx-walk
yarn add acorn-jsx-walk
bun add acorn-jsx-walk
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-07-19 |
| First published | 2015-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Julian Lloyd |
| Maintainers | chtefi |
| Keywords | acorn, jsx, walk, parse |

## Links

- npm: https://www.npmjs.com/package/acorn-jsx-walk
- Repository: https://github.com/sderosiaux/acorn-jsx-walk
- Homepage: https://github.com/sderosiaux/acorn-jsx-walk#readme
- Issues: https://github.com/sderosiaux/acorn-jsx-walk/issues
- npm.io page: https://npm.io/package/acorn-jsx-walk

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-07-19
- 2.0.0-canary.6 (next) — 2019-03-10
- 2.0.0-canary.5 — 2019-03-07
- 2.0.0-canary.4 — 2019-03-07
- 2.0.0-canary.3 — 2019-02-15
- 2.0.0-canary.2 — 2019-02-15
- 2.0.0-canary.1 — 2019-02-15
- 1.0.1 — 2015-09-14
- 1.0.0 — 2015-09-14

## README

# acorn-jsx-walk

JSX support for Acorn Walk.

## Install

```sh
npm install acorn-jsx-walk
```

## Example

```js
// Extend Acorn parser with JSX
const acorn = require('acorn')
const jsx = require('acorn-jsx')
const parser = acorn.Parser.extend(jsx())

// Extend Acorn walk with JSX
const walk = require('acorn-walk')
const { extend } = require('acorn-jsx-walk')

extend(walk.base)

// Create AST from source containing JSX
const source = `
  const a = 2
  const fn = () => {
    const el = <div>Hello world!</div>
    return el
  }
`
const ast = parser.parse(source)

// Finally...
walk.simple(ast, {
  JSXElement(node) {
    console.log(`Found a ${node.type}!`)
  },
})
```

---

<p>
Copyright 2019 <a href="https://github.com/sderosiaux/acorn-jsx-walk/graphs/contributors">Contributors</a>
	<br>
Open source under the <a href="https://github.com/sderosiaux/acorn-jsx-walk/blob/master/LICENSE">MIT License</a>.
	<br>
Special thanks to <a href="https://github.com/sderosiaux">@sderosiaux</a> and <a href="https://github.com/adrianheine">@adrianheine</a>.
</p>

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