wiothen

1.0.0-4 • Public • Published

wiothen

Promise, then, on filepaths in a directory tree

This is BETA.

Usage

var wiothen = require('wiothen');
 
wiothen('.', function(filepath, next) {
  // Skip dotfiles, coverage, node_modules
  if (!/^(\.|coverage|node_modules)/
    .test(filepath))
    console.log('got filepath:', filepath);
  next();
})
.then(function () {
  console.log('no more filepaths');
})
.catch(function (err) {
  console.log('got error:', err.message);
  return;
});

Output:

got filepath: package.json
got filepath: index.js
got filepath: README.md
no more filepaths

Package Sidebar

Install

npm i wiothen

Weekly Downloads

0

Version

1.0.0-4

License

MIT

Last publish

Collaborators

  • ecman