get global and function scope in javascript using the JS AST
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
node_modules
test
.gitignore
.travis.yml
README.md
getScope.js
package.json

README.md

get-scope

Build Status NPM version

Install

npm install get-scope

Usage

var esprima = require('esprima')
var getScope = require('get-scope')

var ast = esprima.parse('var a = 1')

getScope.forProgram(ast) // { a: { type: 'Literal', value: 1 } }

License

MIT