ast-stream

0.0.16 • Public • Published

ast-stream

Abstract Syntax Tree as a stream

example:

    var map = require('map-stream');
    var vfs = require('vinyl-fs');
 
    var toAst = require('ast-stream')();
 
    var astSrc = vfs.src(['./src/utils/*.js'])
        .pipe(toAst)
        .pipe(map(function (file, cb) {
            var ast = file.ast;
            // do something with ast, e.g. transform it
            console.log(ast);
            cb(null, file);
        }));

Package Sidebar

Install

npm i ast-stream

Weekly Downloads

3

Version

0.0.16

License

MIT

Last publish

Collaborators

  • hex13