Code Monkey home page Code Monkey logo

iroh's Introduction

Iroh

Website | Examples | API

NPM Version NPM Downloads

โ˜• Dynamic code analysis for JavaScript


Description

Iroh is a dynamic code analysis tool for JavaScript. Iroh allows to record your code flow in realtime, intercept runtime informations and manipulate program behaviour on the fly.

What is Dynamic analysis?

Dynamic analysis is in contrast to static analysis (e.g. used in Babel and ESlint). It allows to collect data which is only available at runtime. Iroh makes it possible to collect type informations of your running program, analyze it's behaviour, capture and manipulate runtime values like parameters or variables - and all this while your code is actually running!

Getting started

You can learn how to use Iroh here.

A summary of Iroh's API can be found here.

Installation

npm install iroh

or alternatively the browser distribution from here.

Examples

You can play with some live examples here and you can clone them from here.

Below you can see an example of visualizing captured runtime data. While the code below is running, Iroh feeds us a stream of runtime informations, which we can then visualize within any kind of model. In this case we are using a simple textual model to visualize all Iroh.CALLS (function calls) and Iroh.IF (if statements) of the input code. The code indentation in the output is automatically generated by Iroh too.

Input

function factorial(n) {
  if (n === 0) return 1;
  return n * factorial(n - 1);
};
factorial(3);

Output

call factorial ( [3] )
  call factorial ( [2] )
    call factorial ( [1] )
      call factorial ( [0] )
        if
        if end
      call factorial end -> [1]
    call factorial end -> [1]
  call factorial end -> [2]
call factorial end -> [6]

iroh's People

Contributors

maierfelix avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.