A recursive Node.js directory reader with stream and promise APIs, optimized for low memory and CPU usage.
Readdirp is a Node.js library that recursively reads directories, offering both stream and promise APIs. It solves the problem of efficiently traversing large directory trees with minimal memory and CPU overhead, providing more control and performance than Node's built-in fs.readdir.
Node.js developers who need to recursively process file systems, such as those building file watchers, build tools, or applications that scan directory structures.
Developers choose readdirp for its low resource consumption, flexible filtering options, and dual API support, making it ideal for performance-critical file system operations.
Recursive version of fs.readdir with small RAM & CPU footprint.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The stream API minimizes RAM and CPU usage, ideal for large directory trees, with async iteration support as shown in the README examples for low-resource consumption.
Offers both stream and promise APIs, allowing choice based on needs; the promise API provides a simpler interface, though the README notes it uses more resources.
Includes fileFilter and directoryFilter options for precise entry inclusion, demonstrated in code snippets for filtering by extension or excluding directories like .git.
Built with performance in mind, featuring backpressure support and efficient resource management, noted in the changelog for significant speed improvements in v3.x.
Major version upgrades (e.g., v2 to v3, v3 to v4) introduced breaking changes like signature alterations and removed features, requiring careful migration and code updates.
Glob pattern matching was removed in v4.0 to reduce dependencies, forcing users to implement custom filtering if they need glob-like functionality, limiting out-of-the-box features.
Enabling alwaysStat: true can double execution time, as warned in the README, making it inefficient for operations that require file metadata like size or mtime.