Shrub
Manipulate lists of files recursively in Node. Chainable API with a promise ending.
Install
npm install shrub --save
Usage
var shrub = ; ;
Methods
each(callback)
Asynchronous loop through file tree Returns an array. The next
callback takes no arguments.
;
filter(callback)
Aynchronously filter the file tree. Returns an array. The next
callback takes a truthy value and will filter similar to Array.prototype.filter
.
;
find(callback)
Asynchronously find a single item in the files true. Returns a single object. The next
callback takes a truth value and will return the first item in the file list that is true.
;
then(callback)
Promise-looking callback after all the manipulation methods have fun. Receives a files
value as the only arguments (is a single object of a file if the last manipulation method is filter
).
var s = ; // Then, somewhere else.s;
Run tests
npm install
npm test