summaryrefslogtreecommitdiff
path: root/alarm/node_modules/acorn-globals/README.md
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-10-18 08:59:09 +0200
committerMinteck <contact@minteck.org>2022-10-18 08:59:09 +0200
commit2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 (patch)
tree17848d95522dab25d3cdeb9c4a6450e2a234861f /alarm/node_modules/acorn-globals/README.md
parent108525534c28013cfe1897c30e4565f9893f3766 (diff)
downloadpluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.gz
pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.bz2
pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.zip
Update
Diffstat (limited to 'alarm/node_modules/acorn-globals/README.md')
-rw-r--r--alarm/node_modules/acorn-globals/README.md81
1 files changed, 81 insertions, 0 deletions
diff --git a/alarm/node_modules/acorn-globals/README.md b/alarm/node_modules/acorn-globals/README.md
new file mode 100644
index 0000000..5f7326f
--- /dev/null
+++ b/alarm/node_modules/acorn-globals/README.md
@@ -0,0 +1,81 @@
+# acorn-globals
+
+Detect global variables in JavaScript using acorn
+
+[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)
+
+[![Build Status](https://img.shields.io/travis/ForbesLindesay/acorn-globals/master.svg)](https://travis-ci.org/ForbesLindesay/acorn-globals)
+[![Dependency Status](https://img.shields.io/david/ForbesLindesay/acorn-globals.svg)](https://david-dm.org/ForbesLindesay/acorn-globals)
+[![NPM version](https://img.shields.io/npm/v/acorn-globals.svg)](https://www.npmjs.org/package/acorn-globals)
+
+## Installation
+
+ npm install acorn-globals
+
+## Usage
+
+detect.js
+
+```js
+var fs = require('fs');
+var detect = require('acorn-globals');
+
+var src = fs.readFileSync(__dirname + '/input.js', 'utf8');
+
+var scope = detect(src);
+console.dir(scope);
+```
+
+input.js
+
+```js
+var x = 5;
+var y = 3, z = 2;
+
+w.foo();
+w = 2;
+
+RAWR=444;
+RAWR.foo();
+
+BLARG=3;
+
+foo(function () {
+ var BAR = 3;
+ process.nextTick(function (ZZZZZZZZZZZZ) {
+ console.log('beep boop');
+ var xyz = 4;
+ x += 10;
+ x.zzzzzz;
+ ZZZ=6;
+ });
+ function doom () {
+ }
+ ZZZ.foo();
+
+});
+
+console.log(xyz);
+```
+
+output:
+
+```
+$ node example/detect.js
+[ { name: 'BLARG', nodes: [ [Object] ] },
+ { name: 'RAWR', nodes: [ [Object], [Object] ] },
+ { name: 'ZZZ', nodes: [ [Object], [Object] ] },
+ { name: 'console', nodes: [ [Object], [Object] ] },
+ { name: 'foo', nodes: [ [Object] ] },
+ { name: 'process', nodes: [ [Object] ] },
+ { name: 'w', nodes: [ [Object], [Object] ] },
+ { name: 'xyz', nodes: [ [Object] ] } ]
+```
+
+## Security contact information
+
+To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
+
+## License
+
+ MIT