Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : README.md
# dash-ast

walk an AST, quickly

[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url]

[npm-image]: https://img.shields.io/npm/v/dash-ast.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/dash-ast
[travis-image]: https://img.shields.io/travis/goto-bus-stop/dash-ast.svg?style=flat-square
[travis-url]: https://travis-ci.org/goto-bus-stop/dash-ast
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard

## Install

```
npm install dash-ast
```

## Usage

```js
var dashAst = require('dash-ast')
var isIdentifier = require('estree-is-identifier')

var deps = []
dashAst(ast, function (node, parent) {
  if (node.type === 'CallExpression' && isIdentifier(node.callee, 'require')) {
    deps.push(node.arguments[0])
  }
})
```

## API

### `dashAst(ast, callback)`

Call `callback(node, parent)` on each node in `ast`. This does a preorder traversal, i.e. `callback` receives child nodes _after_ the parent node.

### `dashAst(ast, { enter, leave })`

Call `enter(node, parent)` on each node in `ast` before traversing its children, and call `leave(enter, parent)` on each node _after_ traversing its children. If a node does not have children, `enter()` and `leave()` are called immediately after each other.

## License

[Apache-2.0](LICENSE.md)
© 2026 GrazzMean