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

path-filters

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-filters - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

17

index.js

@@ -8,2 +8,6 @@ var fs = require('fs');

function normalizePath(path) {
return path = path.replace(/\\/g, '/');
}
var simpleRegExpTest = /[\?\*]/;

@@ -101,3 +105,8 @@

PathFilters.prototype.isEmpty = function() {
return this._filters.length === 0;
}
PathFilters.prototype.getMatch = function(path) {
path = normalizePath(path);
for (var i = 0, len = this._filters.length; i < len; i++) {

@@ -113,2 +122,3 @@ var result = this._filters[i].test(path);

PathFilters.prototype.getMatches = function(path) {
path = normalizePath(path);
var matches = [];

@@ -126,2 +136,3 @@ for (var i = 0, len = this._filters.length; i < len; i++) {

PathFilters.prototype.hasMatch = function(path) {
path = normalizePath(path);
return this.getMatch(path) !== undefined ? true : false;

@@ -184,2 +195,6 @@ }

PathFilters.prototype.toString = function() {
return require('util').inspect(this._filters);
}
module.exports = {

@@ -190,2 +205,2 @@ PathFilters: PathFilters,

}
}
}

2

package.json
{
"name": "path-filters",
"description": "Manages a collection of path-based filters",
"version": "1.0.4",
"version": "1.0.5",
"homepage": "https://github.com/philidem/node-path-filters",

@@ -6,0 +6,0 @@ "authors": [

Sorry, the diff of this file is not supported yet

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