@hummus-1/ast-types
v1.0.0
Published
Ast-types spread operator traduction to ECMA-5
Downloads
2
Maintainers
Readme
ast-types
Installation
npm install @hummus-1/ast-types
Usage as executable:
spread input_file output_file
Usage from code:
const at = require('ast-types');
//call the function with the string containing the code
Examples
hoid@Urithiru:~/Uni/Tercero/PL/ast-types-daniel-garcia-hernandez-alu0101353340$ spread input.txt output.js
File read succesfully
Output written succesfully in output.js
Author
alu0101353340 - Daniel García Hernández - Hummus-1
Tests
hoid@Urithiru:~/Uni/Tercero/PL/ast-types-daniel-garcia-hernandez-alu0101353340$ npm run cov
> @hummus-1/[email protected] cov
> jest --coverage
PASS test/test.js
Works correctly with the spread operator as argument
✓ With a function declaration (14 ms)
✓ With a function expression (3 ms)
✓ With an arrow function (2 ms)
Works correctly with the spread operator inside an array
✓ When declaring a variable (2 ms)
✓ As a constant variable (2 ms)
✓ Inside another methods and an arrow function (2 ms)
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
ast-types.js | 100 | 100 | 100 | 100 |
--------------|---------|----------|---------|---------|-------------------
Test Suites: 1 passed, 1 total
Tests: 6 passed, 6 total
Snapshots: 0 total
Time: 0.274 s, estimated 1 s
Ran all test suites.