
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
Recursively walk directory trees. Think /usr/bin/find.
require('findit').find(__dirname, function (file) {
console.log(file);
})
var finder = require('findit').find(__dirname);
finder.on('directory', function (dir, stat) {
console.log(dir + '/');
});
finder.on('file', function (file, stat) {
console.log(file);
});
finder.on('link', function (link, stat) {
console.log(link);
});
var files = require('findit').sync(__dirname);
console.dir(files);
Do an asynchronous recursive walk starting at basedir.
Optionally supply an options object. Setting the property 'follow_symlinks' will follow symlinks.
Optionally supply a callback that will get the same arguments as the path event documented below in "events".
If basedir is actually a non-directory regular file, findit emits a single
"file" event for it then emits "end".
Findit uses fs.lstat() so symlinks are not traversed automatically. To have it
follow symlinks, supply the options argument with 'follow_symlinks' set to true.
Findit won't traverse an inode that it has seen before so directories can have
symlink cycles and findit won't blow up.
Returns an EventEmitter. See "events".
Return an array of files and directories from a synchronous recursive walk
starting at basedir.
Optionally supply an options object. Setting the property 'follow_symlinks' will follow symlinks.
An optional callback cb will get called with cb(file, stat) if specified.
Emitted for just files which are not directories.
Emitted for directories.
Emitted for both files and directories.
Emitted when the recursive walk is done.
The 'glob' package allows for pattern matching and file searching using glob patterns. It is more flexible in terms of specifying patterns for file matching compared to 'findit', but it may be less efficient for large directory trees.
The 'readdirp' package provides a recursive version of 'fs.readdir'. It offers a more modern API with promises and streams, making it easier to integrate with async/await syntax. It is similar to 'findit' in terms of functionality but provides more modern features.
The 'walk' package is another alternative for recursively walking through directories. It provides a similar event-based API to 'findit' but includes additional features like filtering and limiting the depth of the search.
FAQs
walk a directory tree recursively with events
The npm package findit receives a total of 192,091 weekly downloads. As such, findit popularity was classified as popular.
We found that findit 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.