![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
recursive-readdir-async
Advanced tools
Module to recursive read directory async (non blocking). Must be used with Promises. Configurable, extended filtering. etc.
NPM Module to recursive read directory async (non blocking). Returns Promise. Configurable, with callback for extended filtering and progress status. Quiet, NO dependencies. As non blocking module is perfect to be used in any javascript based Desktop applications.
This module uses Promises and can't be used in old javascript engines.
For normal usage into a project, you must install as a NPM dependency. The next command will do all the work:
npm install --save recursive-readdir-async
After install, you can use the module using the require key:
// Assign recursive-readdir-async to constant
const rra = require('recursive-readdir-async')
// use it
Example of basic usage:
const rra = require('recursive-readdir-async');
const list = await rra.list('.');
console.log(list)
const rra = require('recursive-readdir-async');
rra.list('.');
rra.then(function(list){
console.log(list)
})
Example with full features:
const rra = require('recursive-readdir-async');
const options = {
mode: rra.LIST,
recursive: true,
stats: false,
ignoreFolders: true
}
const list = await rra.list('.', options, function (obj, index, total) {
console.log(`${index} of ${total} ${obj.path}`)
if(obj.name=="folder2")
return true;// return true to delete item
})
if(list.error)
console.error(list.error)
else
console.log(list)
An options object can be passed to configure the module. The next options can be used:
The function will return an object and never throw an error. All errors will be added to the returned object. The return object in LIST mode are like this:
[
{
"name":"item_name",
"path":"/absolute/path/to/item",
"fullname":"/absolute/path/to/item/item_name",
"isDirectory": true,
"stats":{
}
},
{
"name":"file.txt",
"path":"/absolute/path/to/item/item_name",
"fullname":"/absolute/path/to/item/item_name/file.txt",
"isDirectory": false,
"stats":{
}
}
]
The same example as TREE:
[
{
"name":"item_name",
"path":"/absolute/path/to/item",
"fullname":"/absolute/path/to/item/item_name",
"isDirectory": true,
"stats":{
},
"contents": [
{
"name":"file.txt",
"path":"/absolute/path/to/item/item_name",
"fullname":"/absolute/path/to/item/item_name/file.txt",
"isDirectory": false,
"stats":{
}
}
]
}
]
isDirectory only exists if stats, recursive or ignoreFolders are true or mode are TREE
stats only exists if stats is true
All errors will be added to the returned object. If error occurs on the main call, the error will be returned like this:
{
"error":
{
"message": "ENOENT: no such file or directory, scandir '/inexistentpath'",
"errno": -4058,
"code": "ENOENT",
"syscall": "scandir",
"path": "/inexistentpath"
},
"path":"/inexistentpath"
}
For errors with files and folders, the error will be added to the item like this:
[
{
"name":"item_name",
"path":"/absolute/path/to/item",
"fullname":"/absolute/path/to/item/item_name",
"error":{
}
}
{
"name":"file.txt",
"path":"/absolute/path/to/item",
"fullname":"/absolute/path/to/item/file.txt",
"error":{
}
}
]
FAQs
Module to recursive read directory async (non blocking). Must be used with Promises. Configurable, extended filtering. etc.
The npm package recursive-readdir-async receives a total of 5,480 weekly downloads. As such, recursive-readdir-async popularity was classified as popular.
We found that recursive-readdir-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.