Socket
Socket
Sign inDemoInstall

multimatch

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multimatch - npm Package Compare versions

Comparing version 0.3.0 to 1.0.0

9

index.js

@@ -20,9 +20,12 @@ 'use strict';

return patterns.reduce(function (ret, pattern, i) {
return patterns.reduce(function (ret, pattern) {
var process = union;
if (pattern[0] === '!') {
return diff(ret, minimatch.match(ret, pattern.slice(1), options));
pattern = pattern.slice(1);
process = diff;
}
return union(ret, minimatch.match(list, pattern, options));
return process(ret, minimatch.match(list, pattern, options));
}, []);
};
{
"name": "multimatch",
"version": "0.3.0",
"version": "1.0.0",
"description": "Extends minimatch.match() with support for multiple patterns",

@@ -41,5 +41,5 @@ "license": "MIT",

"dependencies": {
"array-differ": "^0.1.0",
"array-union": "^0.1.0",
"minimatch": "^0.3.0"
"array-differ": "^1.0.0",
"array-union": "^1.0.0",
"minimatch": "^1.0.0"
},

@@ -46,0 +46,0 @@ "devDependencies": {

@@ -6,17 +6,2 @@ # multimatch [![Build Status](https://travis-ci.org/sindresorhus/multimatch.svg?branch=master)](https://travis-ci.org/sindresorhus/multimatch)

#### Comparison
Minimatch:
```js
minimatch.match(['unicorn', 'cake', 'rainbows'], '*corn');
```
Multimatch:
```js
multimatch(['unicorn', 'cake', 'rainbows'], ['*corn', 'rain*']);
```
## Install

@@ -47,4 +32,20 @@

## Globbing patterns
Just a quick overview.
- `*` matches any number of characters, but not `/`
- `?` matches a single character, but not `/`
- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part
- `{}` allows for a comma-separated list of "or" expressions
- `!` at the beginning of a pattern will negate the match
## Related
See [globby](https://github.com/sindresorhus/globby) if you need to match against the filesystem instead of a list.
## License
MIT © [Sindre Sorhus](http://sindresorhus.com), [Jon Schlinkert](https://github.com/jonschlinkert)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc