This package has been deprecated

Author message:

See @fcostarodrigo/walk

rfc-walk
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

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

Package Sidebar

Install

npm i rfc-walk

Weekly Downloads

12

Version

3.0.4

License

MIT

Unpacked Size

7.46 kB

Total Files

13

Last publish

Collaborators

  • fcostarodrigo