Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

matcher-collection

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matcher-collection - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.npmignore

2

index.js

@@ -24,3 +24,3 @@ 'use strict';

MatcherCollection.prototype.mayContain = function(value) {
var parts = value.split('/').filter(Boolean);
var parts = value.split(/\/|\\/g).filter(Boolean);

@@ -27,0 +27,0 @@ for (var i = 0; i < this.matchers.length; i++) {

{
"name": "matcher-collection",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -45,1 +45,31 @@ var fs = require('fs');

});
// this can be consolidated if AppVeyor is added
test('MatcherCollection#mayContain Windows', function(t) {
t.mayContain('dir\\bar.txt', ['dir/bar.txt']);
t.mayNotContain('dir\\bar.foo', ['dir/bar.txt']);
t.mayContain('dir\\bar.foo', ['dir/bar.{txt,foo}']);
t.mayContain('dir\\bar.txt', ['dir/bar.{txt,foo}']);
t.mayContain('dir\\', ['dir/bar.txt']);
t.mayContain('dir\\', ['dir/bar.{txt,foo}']);
t.mayContain('dir\\', ['dir/bar.{foo,txt}']);
t.mayContain('dir\\', ['{dir,bar}']);
t.mayContain('dir\\', ['{bar,dir}/foo']);
t.mayNotContain('dir\\', ['{bar}']);
t.mayNotContain('bar', ['baz']);
t.mayNotContain('dir\\subdir', ['dir/bar.txt']);
t.mayNotContain('dir\\zzz.txt', ['dir/bar.txt']);
t.mayNotContain('foo.txt', ['dir/bar.txt']);
t.mayNotContain('some-other-dir', ['dir/bar.txt']);
t.mayNotContain('symlink1', ['dir/bar.txt']);
t.mayNotContain('symlink2', ['dir/bar.txt']);
t.mayNotContain('foo.txt', ['dir/bar.txt']);
t.mayContain('foo\\baz', ['foo/baz/bar/{buz,quz}']);
t.mayContain('foo\\baz', ['foo/{bar,baz}/bar/{buz,quz}']);
t.mayNotContain('foo\\baz\\quz', ['foo/{bar,baz}/bar/{buz,quz}']);
t.mayContain('foo\\baz', ['foo/{bar,baz}/bar/{buz,quz}']);
t.mayContain('foo\\bar', [new Minimatch('foo/bar')]);
t.end();
});
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