constant-folding
Module that offers a simple constant folding function for your code, it gets rid of opperations between literals such as 2 + 3
.
Installation
Usage as executable:
$ cf inputCode.js [-o] [outputFile.js]
Usage from code:
const constantFolding = require('constant-folding');
let foldedCode = constantfolding(codeToFold);
The documentation of the function.
Examples
Author
Name Jorge Gonzalez Delgado
Email alu0101330105@ull.edu.es