Fetching contributors…
Cannot retrieve contributors at this time
64 lines (37 sloc) 2.45 KB

FromJS Build Status

FromJS is dynamic dataflow analysis tool. You can use it to discover code and understand JavaScript apps.

FromJS is in currently. If you find any issues (you probably will) please report them on Github.

This is how you use it: open any web page, select an element with the DOM inspector, then view the source of the inspected data. The screenshot below shows the the todo item was loaded from localStorage:

Getting started

Install FromJS:

Yarn: sudo yarn global add @fromjs/cli
NPM: sudo npm install -g @fromjs/cli --unsafe-perm (Why unsafe-perm?)

Run FromJS: fromjs - this will open a Chrome browser window

By default this will launch a web server on localhost:7000, a proxy server on port 7001, and store the collected data in ./fromjs-session.

Loading pages will be slow! For large apps expect it to take several minutes. It will be faster once the page's JS files are cached. Maybe try something simple like Backbone TodoMVC to get started.

The page inspector UI

  • explain dataflow concept / what the steps mean
  • can select characters
  • view argument list


Instead of using the DOM Inspector you can also use the global fromJSInspect function in the inspected page.

If you control the code for the inspected page you can write something like this:

var greeting = "Hello world!"

You can also inspect DOM elements:



Node isn't currently supported, although if we can figure out how to intercept the JS before it's executed by Node it should be pretty straightforward to implement.

How it works

Read about it here.

Key libraries used:


Check out the file.