Gathering detailed insights and metrics for @digifi/acorn-globals
Gathering detailed insights and metrics for @digifi/acorn-globals
npm install @digifi/acorn-globals
Typescript
Module System
Node Version
NPM Version
70
Supply Chain
92.3
Quality
82.6
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
24,389
Last Day
3
Last Week
21
Last Month
185
Last Year
5,314
79 Commits
2 Watching
1 Branches
7 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.3
Package Id
@digifi/acorn-globals@1.0.3
Unpacked Size
9.41 kB
Size
3.24 kB
File Count
4
NPM Version
6.7.0
Node Version
11.14.0
Cumulative downloads
Total Downloads
Last day
-25%
3
Compared to previous day
Last week
-59.6%
21
Compared to previous week
Last month
-20.3%
185
Compared to previous month
Last year
-58.8%
5,314
Compared to previous year
3
1
Detect global variables in JavaScript using acorn
Get supported acorn-globals with the Tidelift Subscription
npm install acorn-globals
detect.js
1var fs = require('fs'); 2var detect = require('acorn-globals'); 3 4var src = fs.readFileSync(__dirname + '/input.js', 'utf8'); 5 6var scope = detect(src); 7console.dir(scope);
input.js
1var x = 5; 2var y = 3, z = 2; 3 4w.foo(); 5w = 2; 6 7RAWR=444; 8RAWR.foo(); 9 10BLARG=3; 11 12foo(function () { 13 var BAR = 3; 14 process.nextTick(function (ZZZZZZZZZZZZ) { 15 console.log('beep boop'); 16 var xyz = 4; 17 x += 10; 18 x.zzzzzz; 19 ZZZ=6; 20 }); 21 function doom () { 22 } 23 ZZZ.foo(); 24 25}); 26 27console.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] ] } ]
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More