trastpiler is a lightweight, agnostic AST transpiler for JavaScript. Version 2.0.0 introduces breaking changes over 1.x, with a focus on plugin-based transformations and improved TypeScript support. It allows traversing and transforming Abstract Syntax Trees (ASTs) using a simple visitor pattern. Unlike Babel or jscodeshift, trastpiler is designed to be minimal and framework-agnostic, with no built-in parsing — you supply your own AST. Development appears intermittent; the latest release is 2.0.0, published roughly monthly during active phases. It targets Node >=8.6 and has no runtime dependencies.
npm install trastpilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic traversal and transformation of a custom AST using visitor pattern.
Replace `require('trastpiler')` with `import { traverse, transform } from 'trastpiler'`.Upgrade Node to >=8.6.
Create a declarations file or use skipLibCheck.
If you need immutability, deep clone the AST before passing to traverse.
Use named import: import { traverse } from 'trastpiler'Run npm install trastpiler, then use correct import syntax.
Use transform instead of traverse if you need to replace nodes.
No dependency data recorded yet.