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
1.0.0
to
1.0.1
+21
LICENSE
The MIT License (MIT)
Copyright (c) 2014-2016, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+6
-3

@@ -26,2 +26,3 @@ /*!

var res = [];
var re = regex();
var match;

@@ -31,7 +32,9 @@

var line = lines[i++];
if (match = regex().exec(line)) {
var match = re.exec(line);
if (match) {
res.push({
line: i,
variable: match[2] || '',
module: match[3],
col: match.index,
variable: match[1] || '',
module: match[2],
original: line

@@ -38,0 +41,0 @@ });

{
"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": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/jonschlinkert/match-requires",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"repository": {
"type": "git",
"url": "git://github.com/jonschlinkert/match-requires.git"
},
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"repository": "jonschlinkert/match-requires",
"bugs": {
"url": "https://github.com/jonschlinkert/match-requires/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/match-requires/blob/master/LICENSE-MIT"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",

@@ -25,9 +19,8 @@ "engines": {

},
"files": ["index.js"],
"scripts": {
"test": "mocha -R spec"
"test": "mocha"
},
"dependencies": {
"requires-regex": "^0.2.0",
"strip-comments": "^0.3.2"
"requires-regex": "^0.3.1",
"strip-comments": "^0.4.3"
},

@@ -39,4 +32,5 @@ "devDependencies": {

"detective": "^4.0.0",
"gulp-format-md": "^0.1.4",
"mocha": "*",
"should": "^4.0.4"
"should": "*"
},

@@ -70,3 +64,14 @@ "keywords": [

"test"
]
],
"verb": {
"related": {
"list": [
"requires-regex"
]
},
"plugins": [
"gulp-format-md"
],
"layout": "default"
}
}
+22
-20

@@ -1,17 +0,12 @@

# match-requires [![NPM version](https://badge.fury.io/js/match-requires.svg)](http://badge.fury.io/js/match-requires)
# match-requires [![NPM version](https://img.shields.io/npm/v/match-requires.svg)](https://www.npmjs.com/package/match-requires) [![Build Status](https://img.shields.io/travis/jonschlinkert/match-requires.svg)](https://travis-ci.org/jonschlinkert/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.
- [benchmarks](#benchmarks)
- [usage](#usage)
- [tests](#tests)
- [Usage](#usage)
* [Code comments](#code-comments)
- [Benchmarks](#benchmarks)
- [License](#license)
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
## Install with [npm](npmjs.org)
```bash
npm i match-requires --save
```
## Usage

@@ -99,25 +94,32 @@

## Related projects
## Run tests
[requires-regex](https://www.npmjs.com/package/requires-regex): Regular expression for matching javascript require statements. | [homepage](https://github.com/jonschlinkert/requires-regex)
## Running tests
Install dev dependencies:
```bash
npm i -d && npm test
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/match-requires/issues/new).
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)
Released under the MIT license.
***
_This file was generated by [verb](https://github.com/assemble/verb) on January 22, 2015._
_This file was generated by [verb](https://github.com/verbose/verb) on January 07, 2016._