3.0.4 • Published 4 years ago

rfc-walk v3.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

RFC-WALK

Build Status Maintainability Test Coverage

Simple node module to transverse files recursively.

DEPRECATED: See @fcostarodrigo/walk

Installation

npm install rfc-walk

Usage

const walk = require("rfc-walk");

for (const file of await walk()) {
  console.log(file);
}

await walk({ onPath: console.log });

walk().then(console.log);

Documentation

function walk(options?: {
  root?: string;
  includeFolders?: boolean;
  onPath?: (path: string) => Promise<void> | undefined;
}): Promise<string[]>;
  • root: Path to where start the search.
  • includeFolders: If paths of folders should be returned.
  • onPath: Called with each path found. If it returns a promise, walk will wait for it to resolve.
  • Returns a promise that resolves after the search is finished and it is resolved with a list of paths if onPath is not passed.

Development

Full tests with coverage

npm test

Unit tests and watch for changes

npm run unit-test

License

MIT License

3.0.4

4 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago