given a javascript source code, it returns any undeclared identifiers
npm install esprima-undeclared-identifiers
since I wanted to be able to use JSX and flow, I moved to babylon for this. See https://github.com/capaj/babylon-undeclared-identifiers