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

rrdir

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrdir - npm Package Compare versions

Comparing version 3.1.1 to 3.2.0

17

index.js

@@ -6,3 +6,3 @@ "use strict";

const {join, basename} = require("path");
const multimatch = require("multimatch");
const minimatch = require("minimatch");

@@ -27,3 +27,9 @@ const readdir = promisify(fs.readdir);

if (!opts || !opts.exclude || !opts.exclude.length) return false;
return Boolean(multimatch(basename(path), opts.exclude, opts.minimatch).length);
const name = basename(path);
for (const pattern of opts.exclude) {
if (minimatch(name, pattern, opts.minimatch)) {
return true;
}
}
return false;
}

@@ -33,3 +39,8 @@

if (!opts || !opts.include || !opts.include.length || entry.isDirectory()) return true;
return Boolean(multimatch(entry.name, opts.include, opts.minimatch).length);
for (const pattern of opts.include) {
if (minimatch(entry.name, pattern, opts.minimatch)) {
return true;
}
}
return false;
}

@@ -36,0 +47,0 @@

12

package.json
{
"name": "rrdir",
"version": "3.1.1",
"version": "3.2.0",
"description": "Recursive directory reader with a delightful API",

@@ -18,9 +18,9 @@ "author": "silverwind <me@silverwind.io>",

"dependencies": {
"multimatch": "^4.0.0"
"minimatch": "^3.0.4"
},
"devDependencies": {
"eslint": "^5.16.0",
"eslint-config-silverwind": "^2.1.3",
"updates": "^8.0.2",
"ver": "^4.2.0"
"eslint": "6.2.2",
"eslint-config-silverwind": "4.1.0",
"updates": "8.5.3",
"ver": "5.1.3"
},

@@ -27,0 +27,0 @@ "keywords": [

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