Gathering detailed insights and metrics for astquery
Gathering detailed insights and metrics for astquery
Gathering detailed insights and metrics for astquery
Gathering detailed insights and metrics for astquery
npm install astquery
Typescript
Module System
NPM Version
74.1
Supply Chain
84.2
Quality
74.9
Maintenance
100
Vulnerability
100
License
JavaScript (99.13%)
Shell (0.87%)
Total Downloads
287,184
Last Day
13
Last Week
209
Last Month
1,476
Last Year
18,803
5 Stars
34 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
0.0.11
Package Id
astquery@0.0.11
Size
11.30 kB
NPM Version
1.3.24
Publised On
04 Apr 2014
Cumulative downloads
Total Downloads
Last day
-80.3%
13
Compared to previous day
Last week
-27.2%
209
Compared to previous week
Last month
-69.6%
1,476
Compared to previous month
Last year
-17.3%
18,803
Compared to previous year
2
Use css-like selectors for walking over AST-tree
1var ast = esprima.parse('function test(){ var a, b = 0; a = 1; a += 2; b++; b--; };test();'); 2var astQuery = new ASTQuery(ast, 'es5'); 3astQuery.on({ 4 print: function(node, message) { 5 console.log('node type is ' + node.type + ' | ' + message) 6 } 7 8 , ':: FunctionDeclaration': function(node) { 9 this.print(node, '1| '); 10 } 11 12 , ':: VariableDeclarator': function(node) { 13 this.print(node, '2| ' + node.id.name); 14 } 15 16 , ':: AssignmentExpression[operator="="]': function(node) { 17 this.print(node, '3| ' + node.left.name + "|" + node.operator); 18 } 19 20// TODO:: 21// , ':: UpdateExpression[operator="++"]': function(node) { 22// this.print(node, '4| ' + node.argument.name + "|" + node.operator); 23// } 24 25// TODO:: 26// , ':: :other': function(node) { 27// console.log(' untouched node type is ' + node.type); 28// } 29}, {prefix: '::'}); 30 31astQuery.apply(); 32 33// console output is: 34// > node type is FunctionDeclaration | 1| 35// > node type is VariableDeclarator | 2| a 36// > node type is VariableDeclarator | 2| b 37// > node type is AssignmentExpression | 3| a|= 38
TODO
VariableDeclarator:${function(node){ return node.id.name == 'a' }}
)No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
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 2024-12-16
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