styx

0.2.1 • Public • Published

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);

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i styx

    Weekly Downloads

    9

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    81.8 kB

    Total Files

    44

    Last publish

    Collaborators

    • mariusschulz