JSPM

rocambole-node-update

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10858
  • Score
    100M100P100Q11151F
  • License MIT

Update a rocambole AST node

Package Exports

  • rocambole-node-update

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rocambole-node-update) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rocambole-node-update Build Status

Update a rocambole AST node

Install

npm install --save rocambole-node-update

Example

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