Socket
Socket
Sign inDemoInstall

readdir-cluster

Package Overview
Dependencies
2
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0-next.1703914332.2dacc48c24cc04bab274741e94914479a34c0c17 to 6.0.0-next.1703915240.7e347fe5b6be5966f71a5068aa179d04913a0c4b

2

package.json
{
"title": "readdir-cluster",
"name": "readdir-cluster",
"version": "6.0.0-next.1703914332.2dacc48c24cc04bab274741e94914479a34c0c17",
"version": "6.0.0-next.1703915240.7e347fe5b6be5966f71a5068aa179d04913a0c4b",
"license": "Artistic-2.0",

@@ -6,0 +6,0 @@ "description": "Create a cluster of workers to iterate through the filesystem",

@@ -55,2 +55,4 @@ <!-- TITLE/ -->

Benchmarks:
- Running `readdir-cluster .` returns 7388 files in 500ms

@@ -77,4 +79,11 @@ - Running [`readdir`](https://nodejs.org/api/fs.html#fsreaddirpath-options-callback) with `recursive: true` returns 7388 files in 100ms

As such, you should probably use `readdir` with `recursive: true` or `fdir` instead. As for why this package exists, readdir-cluster was created in 2005, recursive was added to Node.js in 2023, and fdir was created in 2020. That said, there are [several issues](https://github.com/bevry/readdir-cluster/issues) that could potentially improve readdir-cluster performance.
Recommendations:
- if you target Node.js 18.7 and above, you should use [`fs.readdir`](https://nodejs.org/api/fs.html#fsreaddirpath-options-callback) with `recursive: true`
- if you target older Node.js versions, you should use [`@bevry/fs-list`](https://github.com/bevry/fs-list) which uses `fs-readdir` if available otherwise uses the `find` executable which is even more performant (60ms instead of 100ms)
- if you target older Node.js versions and you want a stat object, use `readdir-cluster`
- if you target Nodejs 12 and above, and want a lot of customisation, use [fdir](https://github.com/thecodrr/fdir)
As for why this package exists, `readdir-cluster` was created in 2005, `recursive` was added to Node.js in 2023, and `fdir` was created in 2020. That said, there are [several issues](https://github.com/bevry/readdir-cluster/issues) that could potentially improve `readdir-cluster` performance.
<!-- INSTALL/ -->

@@ -81,0 +90,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc