1.0.12 • Published 3 years ago

@pkemp/dirtraverse v1.0.12

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Dirtraverse

Traverse directory and call a callback with each file/folder. If callback return true for a folder, it's content will be skipped.

Example

const dirtraverse = require('@pkemp/dirtraverse');

dirtraverse.traverse('.', (err, filepath, stats) => {
  console.log('Callback called with path: ', filepath);
  return stats.isDirectory() && path.basename(filepath) === '.git'	// return true if you want to skip traversal of a subfolder
});

See API docs for more information.

Thanks

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.8

3 years ago

1.0.6

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago