inl
v1.0.0
Published
See the inlined contents of a JS function
Downloads
1
Maintainers
Readme
inl
Allows you to see the inlined contents of a JS function.
Works with functions containing objects, arrays and function calls of any kind. Also works with functions containing loops and conditionals that don't depend on variables. Doesn't work with functions containing operators on variables (ex: a => a + 3
).
Can be used to turn JavaScript into a pretty fast lambda-calculus evaluator.
Example
const inl = require("inl");
assert(
inl (a => b => a(b)(c => c))
=== "a => b => a(b)(c => c)");
Note: this is basically LJSON without the parser.