code: function processPath(extensions) {
      var suffix = "/**";
  
      if (extensions.length === 1) {
          suffix += "/*." + extensions[0];
      } else {
          suffix += "/*.{" + extensions.join(",") + "}";
      }
  
      /**
       * A function that converts a directory name to a glob pattern
       *
       * @param {string} pathname The directory path to be modified
       * @returns {string} The glob path or the file path itself
       * @private
       */
      return function(pathname) {
          var newPath = pathname;
  
          if (shell.test("-d", pathname)) {
              newPath = pathname.replace(/[\/\\]$/, "") + suffix;
          }
  
          return newPath.replace(/\\/g, "/").replace(/^\.\//, "");
      };
  }
docs: ------------------------------------------------------------------------------ Helpers ------------------------------------------------------------------------------ 
  Checks if a provided path is a directory and returns a glob string matching
  all files under that directory if so, the path itself otherwise.
  
  Reason for this is that `glob` needs `/**` to collect all the files under a
  directory where as our previous implementation without `glob` simply walked
  a directory that is passed. So this is to maintain backwards compatibility.
  
  Also makes sure all path separators are POSIX style for `glob` compatibility.
  
  @param {string[]} extensions An array of accepted extensions
  @returns {Function} A function that takes a pathname and returns a glob that
  matches all files with the provided extensions if
  pathname is a directory.