code: function (name, data, o) {
        // be sure sub folders exist
        var parent = parentFolder(name), dataType = JSZip.utils.getTypeOf(data);
        if (parent) {
           folderAdd.call(this, parent);
        }
  
        o = prepareFileAttrs(o);
  
        if (o.dir || data === null || typeof data === "undefined") {
           o.base64 = false;
           o.binary = false;
           data = null;
        } else if (dataType === "string") {
           if (o.binary && !o.base64) {
              // optimizedBinaryString == true means that the file has already been filtered with a 0xFF mask
              if (o.optimizedBinaryString !== true) {
                 // this is a string, not in a base64 format.
                 // Be sure that this is a correct "binary string"
                 data = JSZip.utils.string2binary(data);
              }
           }
        } else { // arraybuffer, uint8array, ...
           o.base64 = false;
           o.binary = true;
  
           if (!dataType && !(data instanceof JSZip.CompressedObject)) {
              throw new Error("The data of '" + name + "' is in an unsupported format !");
           }
  
           // special case : it's way easier to work with Uint8Array than with ArrayBuffer
           if (dataType === "arraybuffer") {
              data = JSZip.utils.transformTo("uint8array", data);
           }
        }
  
        return this.files[name] = new ZipObject(name, data, o);
     }
docs: Add a file in the current folder.
  @private
  @param {string} name the name of the file
  @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
  @param {Object} o the options of the file
  @return {Object} the new file.