Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

sweepdir

alexstevovich12Apache-2.01.0.0TypeScript support: included

An alternate glob that returns full file paths, eliminating redundant path.join operations.

file system, fs, glob, file scanning, directory traversal, file paths, path utilities, semantic file handling, fast-glob, node.js fs, recursive file search, file listing, file discovery, file management, node.js utilities

readme

sweepdir

Archetype: Node.js package

sweepdir 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.

Install

npm install sweepdir

Usage

import sweepDir from 'sweepdir';

const files = await sweepDir('./');
console.log(files);
// ['./LICENSE', './README.md', ...etc]

const filesByExt = await sweepDir('./', '**/*.md');
console.log(filesByExt);
// ['./README.md']

API

sweepDir() (Default)

sweepDir() 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.

Development Homepage:

https://github.com/alexstevovich/sweepdir

This link might become sweepdir-node in the future if conflicts arise.

License

Licensed under the Apache License 2.0.