Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

match-requires

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

match-requires - npm Package Compare versions

Comparing version
0.1.2
to
0.2.2
+1
-0
.verb.md
# {%= 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 @@ },

# match-requires [![NPM version](https://badge.fury.io/js/match-requires.svg)](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\'))'
}]);
});
});