Gathering detailed insights and metrics for esrecurse-jsnext
Gathering detailed insights and metrics for esrecurse-jsnext
Gathering detailed insights and metrics for esrecurse-jsnext
Gathering detailed insights and metrics for esrecurse-jsnext
npm install esrecurse-jsnext
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
79 Stars
61 Commits
20 Forks
13 Watchers
1 Branches
14 Contributors
Updated on Jul 20, 2024
Latest Version
3.1.1
Package Id
esrecurse-jsnext@3.1.1
Size
3.03 kB
NPM Version
3.3.12
Node Version
5.3.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Esrecurse (esrecurse) is ECMAScript recursive traversing functionality.
The following code will output all variables declared at the root of a file.
1esrecurse.visit(ast, { 2 XXXStatement: function (node) { 3 this.visit(node.left); 4 // do something... 5 this.visit(node.right); 6 } 7});
We can use Visitor
instance.
1var visitor = new esrecurse.Visitor({ 2 XXXStatement: function (node) { 3 this.visit(node.left); 4 // do something... 5 this.visit(node.right); 6 } 7}); 8 9visitor.visit(ast);
We can inherit Visitor
instance easily.
1function DerivedVisitor() { 2 esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */); 3} 4util.inherits(DerivedVisitor, esrecurse.Visitor); 5DerivedVisitor.prototype.XXXStatement = function (node) { 6 this.visit(node.left); 7 // do something... 8 this.visit(node.right); 9};
And you can invoke default visiting operation inside custom visit operation.
1function DerivedVisitor() { 2 esrecurse.Visitor.call(/* this for constructor */ this /* visitor object automatically becomes this. */); 3} 4util.inherits(DerivedVisitor, esrecurse.Visitor); 5DerivedVisitor.prototype.XXXStatement = function (node) { 6 // do something... 7 this.visitChildren(node); 8};
Copyright (C) 2014 Yusuke Suzuki (twitter: @Constellation) and other contributors.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 8/26 approved changesets -- score normalized to 3
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
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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