{"name":"acorn-globals","version":"4.3.0","description":"Detect global variables in JavaScript using acorn","keywords":["ast","variable","name","lexical","scope","local","global","implicit"],"dependencies":{"acorn":"^6.0.1","acorn-walk":"^6.0.1"},"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":"616ac9a312940c8bd8aff49543105ef7e329bc78","bugs":{"url":"https://github.com/ForbesLindesay/acorn-globals/issues"},"homepage":"https://github.com/ForbesLindesay/acorn-globals#readme","_id":"acorn-globals@4.3.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"integrity":"sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==","shasum":"e3b6f8da3c1552a95ae627571f7dd6923bb54103","tarball":"http://registry-npm.ywwl.com/acorn-globals/download/acorn-globals-4.3.0.tgz","fileCount":4,"unpackedSize":8305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbnNt9CRA9TVsSAnZWagAAYxAP/0hliK4wiPswu/Kp7qND\nvAalsnS88XKlHf4s3RiujlXeglcIU0kK23ouUB2JRKJ3jwJV931ljq+GYS17\n47ZQ+wWbpkORsj61bximhvt0Zx7aSo82rfpjfQVTHVBjIbCOzQw07GSL2gcG\neuAnUNU3lIDATNWsmY0ZZAI86nmhj+S8BWRrdYaotqmjl1FLAWl2viYFRWzn\nmh33lS0Ot5McNJUg4CqpNR9ynFnFWKERpO6mJJPbXCz01Ff3eFEnnKPiTNGu\nOJ53rONLgYfcKMYQMp4icXNNLN4eX5tyNT6mo/jiyK+3WOZi5mrmUvQLzix0\nFYhBabPVABYOVYK2yD+Or8PJXOwBx81CI0aPM5RbEdHvv6vWICzyyxYKExWo\n6kdY8d4+EoZ9p5QwE5LGu82qu7GqbSgmgMgfUA2uK56Fu1wNRbiKF4jCfRJY\nGWn60LFguCpMiA0WQUIuaA7XWP3tZfZJsq3G5c6b4SAEPN5lW+7V8cDxSYAY\nnu3IjhzlrgQxdJM1km0B4zgLFWV+/JJ94tRO6p248YS//BpjNw66nEQ2DrmK\nXB5nnR2aeUBkC0Yx46kprd/I/m9aB0lyBAoTGsfUTB0cQOXXmA9vB/2xrv1x\n7dR8+r/7CeqFTDzIExkP6ZCu+50/RVZNtUf8xem3cSHqXAPu9pBWtzpyy2fU\nLMGu\r\n=D4ss\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGXHwCJdqzAjUMgAp0ZQMQiVgU+QkrPYpO2hFnPjHZB8AiEAugBDee1l58W29kJMleEehl10ZVr+r0sk3HxN5lFb8UQ="}],"size":2895,"noattachment":false,"key":"/acorn-globals/-/acorn-globals-4.3.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.3.0_1537006460943_0.882580479753529"},"_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":1537006461132,"_cnpm_publish_time":1537006461132,"dist-tags":{"canary":"7.0.1-canary-4","latest":"7.0.1"}}