reluxscript 0.1.4

Write AST transformations once. Compile to Babel, SWC, and beyond.
Documentation
// Generated by ReluxScript compiler
// Do not edit manually

module.exports = function({ types: t }) {
  
  class State {
  constructor(count, name) {
      this.count = count;
      this.name = name;
    }
  }
  
  function is_hook_name(name) {
    return (name.startsWith("use") && (name.length > 3));
  }
  
  let state = {};
  
  return {
    visitor: {
      Identifier(path) {
        const node = path.node;
        const name = node.name;
        if ((name === "foo")) {
          path.replaceWith({ name: "bar" });
        }
      }
    }
  };
};