@alu0101313511/constant-folding
v1.1.1
Published
Constant Folding javascript code
Maintainers
Readme
constant-folding
This package allows you to apply Constant Folding to your Javascript code.
Constant folding is the process of recognizing and evaluating constant expressions at compile time rather than computing them at runtime.
Installation
$ npm install @alu0101313511/constant-foldingUsage as executable:
$ npx cfMore information about the executable:
$ npx cf --helpUsage from code:
const constantFolding = require('constant-folding');
//call the functionThe documentation of the function
Examples
$ cat input.js
let v = 3 + 4 + 2;$ npx cf input.js output.js$ cat output.js
let v = 9;Author
Tests
Unit tests:
$ npm testCode coverage:
$ npm cov