@alu0101225296/constant-folding

1.1.0 • Public • Published

npm version CI for constant-folding

constant-folding

Realiza la transformación de plegado de constantes sobre un input dejando la salida el output con los cambios aplicados.

Installation

$ npm install @alu0101225296/constant-folding

Usage as executable:

$ cf input.js output.js

Usage from code:

const constantFolding = require('constant-folding');
//call the function

The documentation of the function.

Examples

// input.js
var f = 3+null;
var e = 4 | 3;
var d = 3+"c";
var b = 9 +1;
var a = 2+3*5+b;
$ cf input.js output.js
// output.js
var f = 3;
var e = 7;
var d = '3c';
var b = 10;
var a = 17 + b;

Author

alu0101225296 Pablo Bande Sánchez - Girón

Package Sidebar

Install

npm i @alu0101225296/constant-folding

Weekly Downloads

6

Version

1.1.0

License

Unlicense

Unpacked Size

1.67 MB

Total Files

55

Last publish

Collaborators

  • alu0101225296