code: function(arg) {
           if (!arg) {
              return this;
           }
  
           if (arg instanceof RegExp) {
              return this.filter(function(relativePath, file) {
                 return file.options.dir && arg.test(relativePath);
              });
           }
  
           // else, name is a new folder
           var name = this.root + arg;
           var newFolder = folderAdd.call(this, name);
  
           // Allow chaining by returning a new object with this folder as the root
           var ret = this.clone();
           ret.root = newFolder.name;
           return ret;
        }
docs: Add a directory to the zip file, or search.
  @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.
  @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.