{"name":"acorn-globals","version":"4.3.1","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":"300c3652094f5cd2c4d53c50f045ed23f0951ce6","bugs":{"url":"https://github.com/ForbesLindesay/acorn-globals/issues"},"homepage":"https://github.com/ForbesLindesay/acorn-globals#readme","_id":"acorn-globals@4.3.1","_nodeVersion":"11.12.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-gJSiKY8dBIjV/0jagZIFBdVMtfQyA5QHCvAT48H2q8REQoW8Fs5AOjqBql1LgSXgrMWdevcE+8cdZ33NtVbIBA==","shasum":"deb149c59276657ebd40ba2ba849ddd529763ccf","tarball":"http://registry-npm.ywwl.com/acorn-globals/download/acorn-globals-4.3.1.tgz","fileCount":4,"unpackedSize":8384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsH63CRA9TVsSAnZWagAAr2EQAKQbLYnQBRdyhOzWbk/U\nOob5VGTB1GfXnC9niw/MJH5NXUXJgImRftT5UzV9WLf5etdV1wysqZjcbP3j\n/eoEPNfjMzm0vXnIBMmfc7Ha7ImRJI68/QSqBaDgaxmPgdrU/5TeEgUne+iM\nn9ijZv4caEIWXdihyDSrh47efyIYe/gbp3NjhH87lUYlmfV2n2SvUq42Lrik\nCsc+yeax44IKB3omITKwQcSELwStTJCMd6MQkhoalLnV+IUk1NqHqwag8zpe\n9PFDmKTlLJqPE2Tjngca13QPB/YW3KZZJKmMq9SHKCTSUcwSPZEpxgSkgcDG\nahUy7i9KMdYT064irEUhadVDqDuhI8lPS72+N/0fXe82U9dSuvF7ESpTUimH\n9i+D7a+4FBmFIjYP5B5GvoMC0KcJGdDvjfcFpJgZ3paLcyIqBu5bHYBFcc+n\nHbeWip/yTgpYhLdxFoX0Tb2lGggWC4EOloDTRSR5DKXsAlZ3rmg+nyYcpWPu\nX+e8znid7OFvE7b5ex+aMyvliqvfawj/dsUr1WE7ZH1j4Eg8vIDrrBcpbxQs\nQ2Y/EF1oYTc7MyjKhJV7G5rMewNAHRN1dGeyt2oWO+EYA9EZkXPktOHMFUog\nWE3IvBGeEJiAMHrxKJguY9HzaguQ/vFUeMJd3JqidDqpqIQZaE2v4PIgvRNa\n5Vz4\r\n=ga7l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHNi8pyC12Lu5Jfq2byNs9uu6GpZvm1SZ6mz0hkReBSTAiBDdgtp4K639Gofbxn/5mX88xuTscXfspM9bMrJovDK6Q=="}],"size":2910,"noattachment":false,"key":"/acorn-globals/-/acorn-globals-4.3.1.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"timothygu","email":"timothygu99@gmail.com"}],"_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/acorn-globals_4.3.1_1555070646533_0.4875622794436336"},"_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":1555070646674,"_cnpm_publish_time":1555070646674,"dist-tags":{"canary":"7.0.1-canary-4","latest":"7.0.1"}}