A CoffeeScript to ES6 transpiler that leverages the CoffeeScript compiler to produce modern JavaScript syntax. Stable version 0.6.2 is available on npm. Unlike other transpilers, Decaf uses the official CoffeeScript parser to build an AST and then maps it to ES6 constructs, falling back to original CoffeeScript output for unsupported syntax. It can be used as a CLI tool or as a Node module with jscodeshift for code transforms. Development appears to be in maintenance mode with limited recent updates.
npm install decafjsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: compile CoffeeScript string and file to ES6 JavaScript using Decaf.
Install with 'npm install decafjs'.
Use: const decaf = require('decafjs'); then decaf.compile(...).Consider alternatives like decaffeinate (more actively maintained).
Run: npm install -g decafjs; then decaf <file or directory>.
Install: npm install coffeescript (or coffee-script for older versions).
Use: const decaf = require('decafjs'); decaf.compile(...);Check source for syntax errors; Decaf falls back to original CoffeeScript output, but invalid syntax will still break.