Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
A helper library to provide provide additonal functions for commonly performed file system operations.
#fs-helper
This is a node module created in order help provide additonal functions for commonly performed file system operations.
This function takes in the top level directory to search, an array of directory names that are the desired name to be located. There is also an optional parameter "subdirectories_found", which is used for recursive calls to this function.
Then it recursively searches sub-directories for directory names that are contained in the "subdirectory_names". If a directory is found that exists in "subdirectory_names" it is added to the "subdirectories_found" array.
This returns an array of the paths to each subdirectory with the matching directory path that was found.
Directory Structure:
/Users/username/node project/
|__directories
|__example directory
|__file.txt
|__not example directory
|__file.txt
|__other directories
|__example directory
|__file.txt
|__not example directory
|__file.txt
var subdir_paths = fsHelper.getDirPathsRecursivelyByNameSync('/Users/username/node project/', ['example directory']);
The result of this operation is that subdir_paths will contain the strings:
FAQs
A helper library to provide provide additonal functions for commonly performed file system operations.
We found that fs-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.