npm

Need private packages and team management tools?Check out npm Orgs. »

@fcostarodrigo/walk

4.0.2 • Public • Published

WALK

Codacy Badge Build Status codecov

Simple node module to transverse files recursively.

Installation

npm install @fcostarodrigo/walk

Usage

const walk = require("@fcostarodrigo/walk");
 
async function main() {
  for await (const file of walk()) {
    console.log(file);
  }
}
 
main();

Documentation

function walk(
  root?: string,
  includeFolders?: boolean,
): AsyncIterableIterator<string>;

root: Path to where the search starts. Defaults to ..

includeFolders: If paths of folders should be returned. Defaults to false.

The function is an async generator that yields the paths of the files recursively.

Development

Full tests with coverage

npm test

Unit tests and watch for changes

npm run unit-test

License

MIT License

install

npm i @fcostarodrigo/walk

Downloadsweekly downloads

7

version

4.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability