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
2
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
2.0.0
to
2.0.1
+5
-2
index.js

@@ -12,3 +12,5 @@ /*!

module.exports = function matchRequires(str, options = {}) {
module.exports = function matchRequires(str, options) {
options = options || {};
if (typeof options === 'boolean' || typeof options === 'function') {

@@ -34,3 +36,3 @@ options = { stripComments: options };

Reflect.defineProperty(tok, 'match', {
Object.defineProperty(tok, 'match', {
enumerable: false,

@@ -42,3 +44,4 @@ value: match

}
return matches;
};
{
"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": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/jonschlinkert/match-requires",

@@ -23,3 +23,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"requires-regex": "^1.0.2",
"requires-regex": "^1.0.4",
"strip-comments": "^1.0.1"

@@ -26,0 +26,0 @@ },

@@ -104,3 +104,5 @@ # match-requires [![NPM version](https://img.shields.io/npm/v/match-requires.svg?style=flat)](https://www.npmjs.com/package/match-requires) [![NPM monthly downloads](https://img.shields.io/npm/dm/match-requires.svg?style=flat)](https://npmjs.org/package/match-requires) [![NPM total downloads](https://img.shields.io/npm/dt/match-requires.svg?style=flat)](https://npmjs.org/package/match-requires) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/match-requires.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/match-requires)

[requires-regex](https://www.npmjs.com/package/requires-regex): Regular expression for matching javascript require statements. | [homepage](https://github.com/jonschlinkert/requires-regex "Regular expression for matching javascript require statements.")
* [requires-regex](https://www.npmjs.com/package/requires-regex): Regular expression for matching javascript require statements. | [homepage](https://github.com/jonschlinkert/requires-regex "Regular expression for matching javascript require statements.")
* [to-regex-range](https://www.npmjs.com/package/to-regex-range): Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than… [more](https://github.com/micromatch/to-regex-range) | [homepage](https://github.com/micromatch/to-regex-range "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.")
* [year-range-regex](https://www.npmjs.com/package/year-range-regex): Generates a regular expression for validating a range of years. | [homepage](https://github.com/jonschlinkert/year-range-regex "Generates a regular expression for validating a range of years.")

@@ -107,0 +109,0 @@ ### Author