
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
fs-walk-breadth-first
Advanced tools
Call a function on each file in a filesystem tree
var walk = require("fs-walk-breadth-first");
walk(".", function(filename, stats) {
console.log(filename, stats.isDirectory());
}, function(err) {
if (err) {
console.error(err);
return;
}
console.log("finished!");
});
npm install --save fs-walk-breadth-first
Traverses all files and directories beneath directory
in breadth-first order. The iterator
function is called on each file or directory, and the callback
function is called after all files and directories have been visited.
directory
- The directory to traverse.iterator(filename, stats, callback)
- A function to apply to each file or directory found. stats
is an instance of fs.Stats. callback(err)
should be called when the iterator is finishedcallback(err)
- A function that is called when all the files and directories have been visited, or when an error occurs.Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
FAQs
Call a function on each file in a filesystem tree
We found that fs-walk-breadth-first 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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.