Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Update a rocambole AST node
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

rocambole-node-update Build Status

Update a rocambole AST node

Install

$ npm install --save rocambole-node-update

Usage

var rocambole = require('rocambole');
var updateNode = require('rocambole-node-update');

rocambole.moonwalk('if (true) { foo() }', function (node) {
    if (node.type === 'CallExpression') {
        updateNode(node, 'bar()');
    }
}).toString();
//=> if (true) { bar() }

License

MIT © Sindre Sorhus

Something went wrong with that request. Please try again.