astw

WebJar for astw

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

astw
Last Version

Last Version

2.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

astw
WebJar for astw
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/substack/astw

Download astw

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/astw/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>astw</artifactId>
    <version>2.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/astw/
implementation 'org.webjars.npm:astw:2.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/astw/
implementation ("org.webjars.npm:astw:2.2.0")
'org.webjars.npm:astw:jar:2.2.0'
<dependency org="org.webjars.npm" name="astw" rev="2.2.0">
  <artifact name="astw" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='astw', version='2.2.0')
)
libraryDependencies += "org.webjars.npm" % "astw" % "2.2.0"
[org.webjars.npm/astw "2.2.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : acorn jar [4.0.3,5)

Project Modules

There are no modules declared in this project.

astw

walk the ast

browser support

build status

This module is a faster version of falafel that only does ast walking and .parent tracking, not source transforms.

example

var astw = require('astw');
var deparse = require('escodegen').generate;
var walk = astw('4 + beep(5 * 2)');

walk(function (node) {
    var src = deparse(node);
    console.log(node.type + ' :: ' + JSON.stringify(src));
});

methods

var astw = require('astw')

var walk = astw(src, opts={})

Return a walk() function from the source string or ast object src.

Optionally:

  • opts.ecmaVersion - default: 8

walk(cb)

Walk the nodes in the ast with cb(node) where node is each element in the ast from esprima but with an additional .parent reference to the parent node.

install

With npm do:

npm install astw

license

MIT

Versions

Version
2.2.0
2.0.0