match-requires
Advanced tools
+1
-0
| # {%= name %} {%= badge("fury") %} | ||
| > {%= description %} | ||
@@ -3,0 +4,0 @@ |
+2
-2
| { | ||
| "name": "match-requires", | ||
| "description": "Match require statements in a string. Returns an array of matching require statements. Each match is an object with line number, variable name, and module name. Statements in code comments are ignored.", | ||
| "version": "0.1.2", | ||
| "version": "0.2.2", | ||
| "homepage": "https://github.com/jonschlinkert/match-requires", | ||
@@ -31,3 +31,3 @@ "author": { | ||
| "dependencies": { | ||
| "requires-regex": "^0.1.1", | ||
| "requires-regex": "^0.2.0", | ||
| "strip-comments": "^0.3.2" | ||
@@ -34,0 +34,0 @@ }, |
+1
-0
| # match-requires [](http://badge.fury.io/js/match-requires) | ||
| > Match require statements in a string. Returns an array of matching require statements. Each match is an object with line number, variable name, and module name. Statements in code comments are ignored. | ||
@@ -3,0 +4,0 @@ |
+10
-0
@@ -39,2 +39,12 @@ /*! | ||
| }); | ||
| it('should ignore statements in code comments:', function () { | ||
| var actual = req('this.helper(\'copyright\', require(\'helper-copyright\'))'); | ||
| actual.should.eql([{ | ||
| line: 1, | ||
| variable: '', | ||
| module: 'helper-copyright', | ||
| original: 'this.helper(\'copyright\', require(\'helper-copyright\'))' | ||
| }]); | ||
| }); | ||
| }); |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7408
4.75%72
14.29%51
2%9
28.57%+ Added
- Removed
Updated