{"name":"acorn-globals","version":"4.2.0","description":"Detect global variables in JavaScript using acorn","keywords":["ast","variable","name","lexical","scope","local","global","implicit"],"dependencies":{"acorn":"^5.0.0"},"devDependencies":{"testit":"^3.0.0"},"scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/acorn-globals.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"aefa66f617c5b4d076b8399f71c9edf4e99be5d7","bugs":{"url":"https://github.com/ForbesLindesay/acorn-globals/issues"},"homepage":"https://github.com/ForbesLindesay/acorn-globals#readme","_id":"acorn-globals@4.2.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"integrity":"sha512-SJO1hjUPtjNmggjhYzepuR2vSFpwbaMpXmLuVoDUKVNdlBA7u1Hyk4Frdo/u9FlXakDUcpNJzo/VELP86z7TIg==","shasum":"502d5503cbbc772adb31d38a39336f670b2327be","tarball":"http://registry-npm.ywwl.com/acorn-globals/download/acorn-globals-4.2.0.tgz","fileCount":4,"unpackedSize":8282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnNtbCRA9TVsSAnZWagAApiwP/AuhNAp3uviz/CImgBDN\n8O6iJfvcH+sBXwRuJtg6EO6Gen2Gb2BanRbfoSmUxB/B7VXdj7+DwFHq9Ylv\n46el4EtOAi2UepW1dQeTN454jfKCHZEszNR7e7/sFV8AigomIyUMylXYI+VB\nw3rvlK5cjnNgPex7S5v1PrdEYl7FNa6bqRwCC/Yo/+P69A9eg7cLO3awMRhf\nQCuOfVO2Lw4OYeGLrx0w1l/h1xA7/LPCe802AHPrBnxdIowc+vIQ+wfHZz95\n+n1yENxKbJenP2isAlGgwTwQSSMWDVOOVC8WpVfVCgBloo3xWUJtUi5Qq68z\nVZliMsgGSZzJbQVhAgamm0jnXxEWVQbu2jWc1Wp8xHOfEZE7E0aRleZn1GhA\neYq+jeokuXHaWg3w5srR2SjTnlJYPmZCW07nV6JbZuI+aQAjsbQO3lV1y/bW\nZenThrTGo1foG2LkHJF5JzaB0b/QrSA8eUMezmDfvjodiy/Pz5GMtWDKLEp4\nig1TgewMVJxup+ytql5/8zZ/Q2QtkFttsocoXJZivfKWf7siYiK2auOyRE+I\n8QjeEIuG5wZzZp+wczPzCIPNSXKLr5vxLJyurhlG3+cJXXuysfqCICJllEpF\nauhm/oASx0B6u0yvQFGWCEpoaOR3vzKRRC4SQGBPttZXFBhziFxLCJaFzRhC\n0ERy\r\n=4KQd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQDVfD6kcdo9fqODDjAvVfSU9gJkpoiZE+R5T4Fa054wIhAM84eFCDrTdnWcFympZsZEbHTReDC5kJBe/6qgAJ7WZ9"}],"size":2897,"noattachment":false,"key":"/acorn-globals/-/acorn-globals-4.2.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/acorn-globals_4.2.0_1537006426831_0.3137548476866072"},"_hasShrinkwrap":false,"readme":"# acorn-globals\n\nDetect global variables in JavaScript using acorn\n\n[Get supported acorn-globals with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-acorn_globals?utm_source=npm-acorn-globals&utm_medium=referral&utm_campaign=readme)\n\n[![Build Status](https://img.shields.io/github/workflow/status/ForbesLindesay/acorn-globals/Publish%20Canary/master?style=for-the-badge)](https://github.com/ForbesLindesay/acorn-globals/actions?query=workflow%3APublish%20Canary+branch%3Amaster)\n[![Rolling Versions](https://img.shields.io/badge/Rolling%20Versions-Enabled-brightgreen?style=for-the-badge)](https://rollingversions.com/ForbesLindesay/acorn-globals)\n[![NPM version](https://img.shields.io/npm/v/acorn-globals?style=for-the-badge)](https://www.npmjs.com/package/acorn-globals)\n\n## Installation\n\n    npm install acorn-globals\n\n## Usage\n\ndetect.js\n\n```js\nvar fs = require('fs');\nvar detect = require('acorn-globals');\n\nvar src = fs.readFileSync(__dirname + '/input.js', 'utf8');\n\nvar scope = detect(src);\nconsole.dir(scope);\n```\n\ninput.js\n\n```js\nvar x = 5;\nvar y = 3, z = 2;\n\nw.foo();\nw = 2;\n\nRAWR=444;\nRAWR.foo();\n\nBLARG=3;\n\nfoo(function () {\n    var BAR = 3;\n    process.nextTick(function (ZZZZZZZZZZZZ) {\n        console.log('beep boop');\n        var xyz = 4;\n        x += 10;\n        x.zzzzzz;\n        ZZZ=6;\n    });\n    function doom () {\n    }\n    ZZZ.foo();\n\n});\n\nconsole.log(xyz);\n```\n\noutput:\n\n```\n$ node example/detect.js\n[ { name: 'BLARG', nodes: [ [Object] ] },\n  { name: 'RAWR', nodes: [ [Object], [Object] ] },\n  { name: 'ZZZ', nodes: [ [Object], [Object] ] },\n  { name: 'console', nodes: [ [Object], [Object] ] },\n  { name: 'foo', nodes: [ [Object] ] },\n  { name: 'process', nodes: [ [Object] ] },\n  { name: 'w', nodes: [ [Object], [Object] ] },\n  { name: 'xyz', nodes: [ [Object] ] } ]\n```\n\n## Security contact information\n\nTo report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.\n\n## License\n\n  MIT\n","publish_time":1537006426996,"_cnpm_publish_time":1537006426996,"dist-tags":{"canary":"7.0.1-canary-4","latest":"7.0.1"}}