Writing programs to do static analysis on Javascript is easier now than ever, thanks to Esprima - the Javascript parser library. In this post, I'll demonstrate how to use Esprima to do something fairly simple - detect accidentally leaked global variables in a program. Accidentally leaked global variables happen when a value is assigned to an identifier without declaring the identifier as a variabl
{{#tags}}- {{label}}
{{/tags}}