Socket
Socket
Sign inDemoInstall

readdir-glob

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

readdir-glob - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

17

index.js

@@ -65,3 +65,10 @@ module.exports = readdirGlob;

for(const file of files) {
const filename = dir + '/' + file.name;
let name = file.name;
if(name === undefined) {
// undefined file.name means the `withFileTypes` options is not supported by node
// we have to call the stat function to know if file is directory or not.
name = file;
useStat = true;
}
const filename = dir + '/' + name;
const relative = filename.slice(1); // Remove the leading /

@@ -73,3 +80,8 @@ const absolute = path + '/' + relative;

}
stats = stats || file;
if(!stats && file.name !== undefined) {
stats = file;
}
if(stats === null) {
stats = { isDirectory: () => false };
}

@@ -115,2 +127,3 @@ if(stats.isDirectory()) {

cb = options;
options = null;
}

@@ -117,0 +130,0 @@

4

package.json

@@ -5,3 +5,3 @@ {

"description": "Recursive fs.readdir with streaming API and glob filtering.",
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/Yqnn/node-readdir-glob",

@@ -21,3 +21,3 @@ "repository": {

"coveralls": "^3.1.0",
"jest": "^26.1.0",
"jest": "^25.5.4",
"mkdirp": "^1.0.0",

@@ -24,0 +24,0 @@ "path-is-absolute": "^1.0.0",

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