All Projects → mariusschulz → styx

mariusschulz / styx

Licence: MIT License
Derives a control flow graph from a JavaScript AST.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

styx

Derives the control flow graph from a JavaScript AST in ESTree format.

This project was created as a proof-of-concept implemention for my Bachelor's thesis in computer science:

Install

$ npm install styx

Usage

With the esprima and styx npm packages installed, Styx can be used as follows:

import Esprima from "esprima";
import * as Styx from "styx";

var code = "var x = 2 + 2;";
var ast = Esprima.parse(code);
var flowProgram = Styx.parse(ast);
var json = Styx.exportAsJson(flowProgram);

console.log(json);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].