{"_id":"free-variables","_rev":"324182","name":"free-variables","description":"get a list of variables used in a JS program","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"time":{"modified":"2021-06-04T01:53:19.000Z","created":"2014-05-17T00:27:04.956Z","0.1.1":"2014-10-28T05:22:36.769Z","0.1.0":"2014-05-17T00:27:04.956Z"},"users":{},"author":{"name":"Jake Rosoman"},"repository":{"type":"git","url":"git://github.com/jkroso/free-variables.git"},"versions":{"0.1.1":{"name":"free-variables","version":"0.1.1","description":"get a list of variables used in a JS program","keywords":["free variable"],"dependencies":{"unique":"https://github.com/jkroso/unique","ast-children":"^0.2.0"},"devDependencies":{"assert":"https://github.com/jkroso/assert","serve":"https://github.com/jkroso/serve","hydro-html":"*","hydro-bdd":"*","hydro-dot":"*","esprima":"*","equals":"*","hydro":"*","jsmd":"*"},"repository":{"type":"git","url":"git://github.com/jkroso/free-variables.git"},"author":{"name":"Jake Rosoman"},"files":["index.js"],"license":"MIT","gitHead":"f3a6fc9fda66f46185d19dabdfd4ecfbe14393c8","bugs":{"url":"https://github.com/jkroso/free-variables/issues"},"homepage":"https://github.com/jkroso/free-variables","_id":"free-variables@0.1.1","scripts":{},"_shasum":"3b0aefbddacd0b0ab156ab1add7c8e79a0ef9c17","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"3b0aefbddacd0b0ab156ab1add7c8e79a0ef9c17","size":1240,"noattachment":false,"key":"/free-variables/-/free-variables-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/free-variables/download/free-variables-0.1.1.tgz"},"directories":{},"publish_time":1414473756769,"_cnpm_publish_time":1414473756769,"_hasShrinkwrap":false},"0.1.0":{"name":"free-variables","version":"0.1.0","description":"get a list of variables used in a JS program","keywords":["free variable"],"dependencies":{"unique":"git://github.com/jkroso/unique","ast-children":"^0.1.1"},"devDependencies":{"assert":"git://github.com/component/assert","serve":"git://github.com/jkroso/serve","hydro-html":"*","hydro-chai":"*","hydro-bdd":"*","hydro-dot":"*","esprima":"*","hydro":"*","jsmd":"*"},"repository":{"type":"git","url":"git://github.com/jkroso/free-variables.git"},"bugs":{"url":"https://github.com/jkroso/free-variables/issues"},"author":{"name":"Jake Rosoman"},"files":["index.js"],"license":"MIT","homepage":"https://github.com/jkroso/free-variables","_id":"free-variables@0.1.0","_shasum":"cb0c636e2a73344e434189461f4658807b3dcec4","_from":".","_npmVersion":"1.4.10","_npmUser":{"name":"jkroso","email":"jkroso@gmail.com"},"maintainers":[{"name":"jkroso","email":"jkroso@gmail.com"}],"dist":{"shasum":"cb0c636e2a73344e434189461f4658807b3dcec4","size":1264,"noattachment":false,"key":"/free-variables/-/free-variables-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/free-variables/download/free-variables-0.1.0.tgz"},"directories":{},"publish_time":1400286424956,"_cnpm_publish_time":1400286424956,"_hasShrinkwrap":false}},"readme":"\n# free-variables\n\n  Get a list of free variables used in a JS program. A free variable is one which is used but not declared.\n\n## Installation\n\nWith your favorite package manager:\n\n- [packin](//github.com/jkroso/packin): `packin add free-variables`\n- [component](//github.com/component/component#installing-packages): `component install jkroso/free-variables`\n- [npm](//npmjs.org/doc/cli/npm-install.html): `npm install free-variables`\n\nthen in your app:\n\n```js\nvar free = require('free-variables')\n```\n\n## API\n\n### free(ast)\n\nTakes any [standard](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API) JS AST and returns and `Array` of `String`'s\n\n```js\nvar parse = require('esprima').parse\nfree(parse('console.log')) // => ['console']\nfree(parse('console[log]')) // => ['console', 'log']\nfree(parse('function b(){a}')) // => ['a']\nfree(parse('var a = 1; a + b')) // => ['b']\nfree(parse('a; var a')) // => []\n```\n","_attachments":{},"homepage":"https://github.com/jkroso/free-variables","bugs":{"url":"https://github.com/jkroso/free-variables/issues"},"license":"MIT"}