GithubHelp home page GithubHelp logo

scope-inspector's Introduction

JavaScript Scope Inspector for Atom

View your JavaScript code from a different perspective. Explore nested scopes and detect variable shadowing and hoisting.

Scope Inspector

This is heavy work-in-progress stuff

I'm working on this as part of my Master's thesis project in Interaction Design.

Don't expect it to work perfectly, especially when it comes to parsing and analyzing the scope. This is a proof-of-concept. Please report any bugs and suggestions.

Install

$ apm install scope-inspector

Default keyboard shortcuts

ctrl+alt+i toggles the sidebar

Metrics & feedback

This is disabled by default.

Scope Inspector is a project I'm doing for my thesis in Interaction Design. For my research, I would like to track some usage metrics. Please enable tracking in the package's settings view, it will help my work a great deal.

Additionally, I am happy for any qualitative feedback I get. If you're willing to participate in an interview, please send me an email.

Here's what is going to be tracked:

  • Your, userId which is a hash generated through your MAC address. Same as what Atom's Metrics package does.
  • Plugin is enabled/disabled
  • Sidebar is toggled
  • Button in bottom bar is hovered (scope highlight)
  • Button in bottom bar is clicked (navigate to surrounding scope)

Features

"Current scope" - the scope that your cursor is placed in :)

Inline

Highlight current scope

Highlight current scope

Indicate hoisted variables

Indicate hoisted variables

Scope Inspector (bottom bar)

  • Show scope nesting
  • Navigate the scope-ladder upwards
  • Highlight surrounding scopes

Sidebar

Sidebar

List parameters, variables and nested functions of the current and all surrounding scopes (closest is on top, furthest [global scope] on the bottom)

Indicate if an identifier will be hoisted

Hosting indicator

Indicate if an identifier shadows another identifier (with the same name, in a surrounding scope)

Shadowing

Indicate if an identifier is shadowed

Shadowed

scope-inspector's People

Contributors

tvooo avatar

Watchers

 avatar  avatar  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.