A transpiler that converts JavaScript code into lambda calculus expressions. Current version 0.4.0 is a WIP with limited functionality, supporting only function declarations, arguments, currying, and parsing functions as tokens. It converts JS functions to Church-encoded lambda terms but does not handle most JavaScript features (conditionals, loops, objects, etc.). Release cadence is irregular; the project is experimental and has not been updated since 2018. Differentiators: it's one of the few tools attempting JS-to-lambda conversion, but remains highly incomplete and is more a proof-of-concept than a production tool.
npm install js-to-lambdaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates converting simple JavaScript functions to lambda calculus using the compile function. Shows Church encodings for true and false.
Check documentation for supported syntax; avoid using any constructs not explicitly listed as supported.
Rename inner parameter to avoid shadowing the outer scope.
Consider forking the project or using an alternative approach if needed.
Rename the inner parameter to a unique name.
Rewrite the code using only supported constructs: function declarations, `function` keyword, basic arguments, and return statements.
Use `import { compile } from 'js-to-lambda'` or `const { compile } = require('js-to-lambda')` if using Node with CJS interop.No dependency data recorded yet.