filesweep is a streamlined alternative to glob
, designed to return immediately useful file paths without extra path.join
operations. By appending full file paths directly to the provided directory, it enhances semantic clarity and reduces boilerplate in most common file-handling tasks.
npm install filesweep
import sweep from 'filesweep';
const files = await sweep('./');
console.log(files);
// ['./LICENSE', './README.md', ...etc]
const filesByExt = await sweep('./','**/*.md');
console.log(filesByExt);
// ['./README.md']
sweep()
is designed as a semantic alternative to glob()
, differentiating itself by returning full file paths. This eliminates redundant path.join
operations, improving code readability in common file-handling workflows.
Provides standard glob
behavior for cases where standard results are preferred.
https://github.com/alexstevovich/filesweep
This link might become filesweep-node in the future if conflicts arise.
Licensed under the Apache License 2.0.