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 8.0.0 to 8.0.1

23

index.js

@@ -28,9 +28,8 @@ "use strict";

function build(dirent, path, stats, opts) {
const entry = {
return {
path,
directory: stats ? stats.isDirectory() : dirent.isDirectory(),
symlink: stats ? stats.isSymbolicLink() : dirent.isSymbolicLink(),
directory: (stats || dirent).isDirectory(),
symlink: (stats || dirent).isSymbolicLink(),
...(opts.stats ? {stats} : {}),
};
if (opts.stats) entry.stats = stats;
return entry;
}

@@ -40,4 +39,4 @@

return {
includeMatcher: include ? picomatch(include, match) : () => true,
excludeMatcher: exclude ? picomatch(exclude, match) : () => false,
includeMatcher: include ? picomatch(include, match) : null,
excludeMatcher: exclude ? picomatch(exclude, match) : null,
};

@@ -88,3 +87,3 @@ }

if (includeMatcher(path)) yield build(dirent, path, stats, opts);
if (!includeMatcher || includeMatcher(path)) yield build(dirent, path, stats, opts);
if (recurse) yield* await rrdir(path, opts, {includeMatcher, excludeMatcher});

@@ -117,3 +116,3 @@ }

const path = makePath(dirent, dir);
if (excludeMatcher(path)) return;
if (excludeMatcher && excludeMatcher(path)) return;

@@ -138,3 +137,3 @@ let stats;

if (includeMatcher(path)) results.push(build(dirent, path, stats, opts));
if (!includeMatcher || includeMatcher(path)) results.push(build(dirent, path, stats, opts));
if (recurse) results.push(...await module.exports.async(path, opts, {includeMatcher, excludeMatcher}));

@@ -169,3 +168,3 @@ }));

const path = makePath(dirent, dir);
if (excludeMatcher(path)) continue;
if (excludeMatcher && excludeMatcher(path)) continue;

@@ -190,3 +189,3 @@ let stats;

if (includeMatcher(path)) results.push(build(dirent, path, stats, opts));
if (!includeMatcher || includeMatcher(path)) results.push(build(dirent, path, stats, opts));
if (recurse) results.push(...module.exports.sync(path, opts, {includeMatcher, excludeMatcher}));

@@ -193,0 +192,0 @@ }

{
"name": "rrdir",
"version": "8.0.0",
"version": "8.0.1",
"description": "Recursive directory reader with a delightful API",

@@ -25,3 +25,3 @@ "author": "silverwind <me@silverwind.io>",

"eslint-config-silverwind": "11.0.2",
"jest": "25.2.3",
"jest": "25.2.4",
"tempy": "0.5.0",

@@ -28,0 +28,0 @@ "updates": "10.2.6",

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