jambda-calc (v0.6.1) is a TypeScript library that transpiles JavaScript/TypeScript functions into pure lambda calculus expressions and visualizes them as Tromp diagrams. It supports arithmetic, common operators, conditionals, nested functions, and basic array methods like .filter() and .map(). The library is in active development with a focus on educational and explorative use—ideal for understanding the theoretical underpinnings of computation. It provides a CLI tool and programmatic API, with TypeScript definitions included. Notable limitations include no support for string operations, recursion, async functions, imports, or advanced member functions. The project aims to handle entire JS projects in the future.
npm install jambda-calcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Transpile a simple addition function to lambda calculus and visualize the result as a Tromp diagram SVG.
Ensure input code only uses supported features: arithmetic, boolean/numbers, conditionals, simple functions, .filter(), .map().
Use only numbers between -100 and 100; larger numbers will cause errors.
Use `pnpm jambda-calc` or `npx jambda-calc` from project directory.
Replace Math.cos() with a manual computation or avoid such functions.
Reduce the number to within [-100, 100] or restructure the logic.
Run `pnpm install jambda-calc` (or npm/yarn) in the project directory. Verify node_modules and package.json.
No dependency data recorded yet.