node package manager

rm-rf

Rimraf and glob all in one.

rm-rf

Rimraf with glob, all in one

$ npm install rm-rf

var rmrf = require('rm-rf');
 
rmrf('**/*.txt', function(error) {
  if(error) {
    console.log(error);
  } else {
    console.log('Files deleted');
  }
});