monocle.js
function distinguishPaths(paths) {
    paths = Array.isArray(paths) ? paths : [paths];
    var result = {
      directories: [],
      files: []
    };
    paths.forEach(function(name) {
      if (fs.statSync(name).isDirectory()) {
        result.directories.push(name);
      } else {
        result.files.push(name);
      }
    });
    return result;
  }
function distinguishPaths(paths) {
    paths = Array.isArray(paths) ? paths : [paths];
    var result = {
      directories: [],
      files: []
    };
    paths.forEach(function(name) {
      if (fs.statSync(name).isDirectory()) {
        result.directories.push(name);
      } else {
        result.files.push(name);
      }
    });
    return result;
  }
function distinguishPaths ( paths ) { paths = Array . isArray ( paths ) ? paths : [ paths ] ; var result = { directories : [ ] , files : [ ] } ; paths . forEach ( function ( name ) { if ( fs . statSync ( name ) . isDirectory ( ) ) { result . directories . push ( name ) ; } else { result . files . push ( name ) ; } } ) ; return result ; }
distinguish between files and directories @returns {Object} contains directories and files array
distinguish between files and directories