1.0.0 • Published 11 years ago
multiline-ast v1.0.0
multiline-ast 
Take an esprima AST and convert multiline-style comment functions into strings.
Usage
multiline(ast)
Pass an esprima-generated ast
object to the module to traverse the tree and
replace functions in the following style:
var x = function() {/*
hello world
*/}
With strings, such as this:
var x = '\n hello world\n'
Note that you must pass the correct options to esprima while parsing to include comment information correctly, i.e.:
var ast = esprima.parse(code, {
comment: true
, ast: true
})
License
MIT. See LICENSE.md for details.
1.0.0
11 years ago